• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
8define void @baz() {
9entry:
10  br i1 undef, label %exit, label %exit
11
12exit:
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
26declare void @bar()
27
28define void @foo(i32 %a, i32 %b) nounwind personality i32 (...)* @__gxx_personality_v0 {
29entry:
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
34next:
35  br i1 %t, label %true, label %return
36true:
37  call void @bar()
38  br label %return
39return:
40  ret void
41unw:
42  %exn = landingpad {i8*, i32}
43            cleanup
44  unreachable
45}
46
47declare i32 @__gxx_personality_v0(...)
48