1 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s 2 ; RUN: llc < %s -mtriple=x86_64-win64 | FileCheck %s 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 8 ; CHECK: movsbl ({{%rdi|%rcx}}), %eax 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 } 22