blob: 14df815663e3d953b7ba62e50543b156841d88e0 [file] [log] [blame]
NAKAMURA Takumi39109a32011-02-22 07:19:28 +00001; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
2; RUN: llc < %s -mtriple=x86_64-win64 | FileCheck %s
Dan Gohmanb00f2362009-10-16 20:59:35 +00003; rdar://7304838
4
5; CodeGenPrepare should move the zext into the block with the load
6; so that SelectionDAG can select it with the load.
7
NAKAMURA Takumi39109a32011-02-22 07:19:28 +00008; CHECK: movzbl ({{%rdi|%rcx}}), %eax
Dan Gohmanb00f2362009-10-16 20:59:35 +00009
10define void @foo(i8* %p, i32* %q) {
11entry:
12 %t = load i8* %p
13 %a = icmp slt i8 %t, 20
14 br i1 %a, label %true, label %false
15true:
16 %s = zext i8 %t to i32
17 store i32 %s, i32* %q
18 ret void
19false:
20 ret void
21}