[X86] Update test/CodeGen/X86/avg.ll with the help of update_llc_test_checks.py....
[oota-llvm.git] / test / CodeGen / X86 / fast-isel-cmp-branch.ll
1 ; RUN: llc -O0 -mtriple=x86_64-linux -asm-verbose=false -verify-machineinstrs < %s | FileCheck %s
2 ; RUN: llc -O0 -mtriple=x86_64-windows-itanium -asm-verbose=false -verify-machineinstrs < %s | FileCheck %s
3
4 ; Fast-isel mustn't add a block to the MBB successor/predecessor list twice.
5 ; The machine verifier will catch and complain about this case.
6 ; CHECK-LABEL: baz
7 ; CHECK: retq
8 define void @baz() {
9 entry:
10   br i1 undef, label %exit, label %exit
11
12 exit:
13   ret void
14 }
15
16 ; rdar://8337108
17
18 ; Fast-isel shouldn't try to look through the compare because it's in a
19 ; different basic block, so its operands aren't necessarily exported
20 ; for cross-block usage.
21
22 ; CHECK: movb    %al, [[OFS:[0-9]*]](%rsp)
23 ; CHECK: callq   {{_?}}bar
24 ; CHECK: movb    [[OFS]](%rsp), %al
25
26 declare void @bar()
27
28 define void @foo(i32 %a, i32 %b) nounwind personality i32 (...)* @__gxx_personality_v0 {
29 entry:
30   %q = add i32 %a, 7
31   %r = add i32 %b, 9
32   %t = icmp ult i32 %q, %r
33   invoke void @bar() to label %next unwind label %unw
34 next:
35   br i1 %t, label %true, label %return
36 true:
37   call void @bar()
38   br label %return
39 return:
40   ret void
41 unw:
42   %exn = landingpad {i8*, i32}
43             cleanup
44   unreachable
45 }
46
47 declare i32 @__gxx_personality_v0(...)