rename test
[oota-llvm.git] / test / CodeGen / X86 / fast-isel-cmp-branch.ll
1 ; RUN: llc -O0 -march=x86-64 -asm-verbose=false < %s | FileCheck %s
2 ; rdar://8337108
3
4 ; Fast-isel shouldn't try to look through the compare because it's in a
5 ; different basic block, so its operands aren't necessarily exported
6 ; for cross-block usage.
7
8 ; CHECK: movb    %al, 7(%rsp)
9 ; CHECK: callq   {{_?}}bar
10 ; CHECK: movb    7(%rsp), %al
11
12 declare void @bar()
13
14 define void @foo(i32 %a, i32 %b) nounwind {
15 entry:
16   %q = add i32 %a, 7
17   %r = add i32 %b, 9
18   %t = icmp ult i32 %q, %r
19   invoke void @bar() to label %next unwind label %unw
20 next:
21   br i1 %t, label %true, label %return
22 true:
23   call void @bar()
24   br label %return
25 return:
26   ret void
27 unw:
28   unreachable
29 }