Dan Gohman | b00f236 | 2009-10-16 20:59:35 +0000 | [diff] [blame^] | 1 | ; 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 | |||||
9 | define void @foo(i8* %p, i32* %q) { | ||||
10 | entry: | ||||
11 | %t = load i8* %p | ||||
12 | %a = icmp slt i8 %t, 20 | ||||
13 | br i1 %a, label %true, label %false | ||||
14 | true: | ||||
15 | %s = zext i8 %t to i32 | ||||
16 | store i32 %s, i32* %q | ||||
17 | ret void | ||||
18 | false: | ||||
19 | ret void | ||||
20 | } |