1; RUN: llc -mtriple=x86_64-apple-darwin10 -O0 < %s | FileCheck %s
2
3; test that we print a label that we use. We had a bug where
4; we would print the jump, but not the label because it was considered
5; a fall through.
6
7; CHECK:        jmp     LBB0_9
8; CHECK: LBB0_9:                                 ## %cleanup
9
10define void @foo()  {
11entry:
12  br i1 undef, label %land.lhs.true, label %if.end11
13
14land.lhs.true:                                    ; preds = %entry
15  br i1 undef, label %if.then, label %if.end11
16
17if.then:                                          ; preds = %land.lhs.true
18  br i1 undef, label %if.then9, label %if.end
19
20if.then9:                                         ; preds = %if.then
21  br label %cleanup
22
23if.end:                                           ; preds = %if.then
24  br label %cleanup
25
26cleanup:                                          ; preds = %if.end, %if.then9
27  switch i32 undef, label %unreachable [
28    i32 0, label %cleanup.cont
29    i32 1, label %if.end11
30  ]
31
32cleanup.cont:                                     ; preds = %cleanup
33  br label %if.end11
34
35if.end11:                                         ; preds = %cleanup.cont, %cleanup, %land.lhs.true, %entry
36  ret void
37
38unreachable:                                      ; preds = %cleanup
39  unreachable
40}
41