blob: 4ab1bc61c7e2c6840a57123f9f4e8c071d70d523 [file] [log] [blame]
Dan Gohman8bef7442010-08-21 02:32:36 +00001; 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
12declare void @bar()
13
14define void @foo(i32 %a, i32 %b) nounwind {
15entry:
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
20next:
21 br i1 %t, label %true, label %return
22true:
23 call void @bar()
24 br label %return
25return:
26 ret void
27unw:
28 unreachable
29}