1; RUN: llc -O0 -mtriple=x86_64-linux -asm-verbose=false < %s | FileCheck %s
2; RUN: llc -O0 -mtriple=x86_64-win32 -asm-verbose=false < %s | FileCheck %s
3; rdar://8337108
4
5; Fast-isel shouldn't try to look through the compare because it's in a
6; different basic block, so its operands aren't necessarily exported
7; for cross-block usage.
8
9; CHECK: movb    %al, [[OFS:[0-9]*]](%rsp)
10; CHECK: callq   {{_?}}bar
11; CHECK: movb    [[OFS]](%rsp), %al
12
13declare void @bar()
14
15define void @foo(i32 %a, i32 %b) nounwind {
16entry:
17  %q = add i32 %a, 7
18  %r = add i32 %b, 9
19  %t = icmp ult i32 %q, %r
20  invoke void @bar() to label %next unwind label %unw
21next:
22  br i1 %t, label %true, label %return
23true:
24  call void @bar()
25  br label %return
26return:
27  ret void
28unw:
29  %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
30            cleanup
31  unreachable
32}
33
34declare i32 @__gxx_personality_v0(...)
35