blob: 9f57d53178f3d14081529f0eccd7f5cd2de277d6 [file] [log] [blame]
Dan Gohmanb00f2362009-10-16 20:59:35 +00001; RUN: llc < %s -march=x86-64 | FileCheck %s
2; rdar://7304838
3
4; CodeGenPrepare should move the zext into the block with the load
5; so that SelectionDAG can select it with the load.
6
7; CHECK: movzbl (%rdi), %eax
8
9define void @foo(i8* %p, i32* %q) {
10entry:
11 %t = load i8* %p
12 %a = icmp slt i8 %t, 20
13 br i1 %a, label %true, label %false
14true:
15 %s = zext i8 %t to i32
16 store i32 %s, i32* %q
17 ret void
18false:
19 ret void
20}