NAKAMURA Takumi | 39109a3 | 2011-02-22 07:19:28 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s |
| 2 | ; RUN: llc < %s -mtriple=x86_64-win64 | FileCheck %s |
Dan Gohman | b00f236 | 2009-10-16 20:59:35 +0000 | [diff] [blame] | 3 | ; 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 Takumi | 39109a3 | 2011-02-22 07:19:28 +0000 | [diff] [blame^] | 8 | ; CHECK: movzbl ({{%rdi|%rcx}}), %eax |
Dan Gohman | b00f236 | 2009-10-16 20:59:35 +0000 | [diff] [blame] | 9 | |
| 10 | define void @foo(i8* %p, i32* %q) { |
| 11 | entry: |
| 12 | %t = load i8* %p |
| 13 | %a = icmp slt i8 %t, 20 |
| 14 | br i1 %a, label %true, label %false |
| 15 | true: |
| 16 | %s = zext i8 %t to i32 |
| 17 | store i32 %s, i32* %q |
| 18 | ret void |
| 19 | false: |
| 20 | ret void |
| 21 | } |