Rafael Espindola | 1edc08b | 2011-06-12 05:57:01 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=x86_64-apple-darwin10 -O0 < %s | FileCheck %s |
Rafael Espindola | c1e903c | 2011-06-12 05:35:39 +0000 | [diff] [blame] | 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 | |
| 10 | define void @foo() { |
| 11 | entry: |
| 12 | br i1 undef, label %land.lhs.true, label %if.end11 |
| 13 | |
| 14 | land.lhs.true: ; preds = %entry |
| 15 | br i1 undef, label %if.then, label %if.end11 |
| 16 | |
| 17 | if.then: ; preds = %land.lhs.true |
| 18 | br i1 undef, label %if.then9, label %if.end |
| 19 | |
| 20 | if.then9: ; preds = %if.then |
| 21 | br label %cleanup |
| 22 | |
| 23 | if.end: ; preds = %if.then |
| 24 | br label %cleanup |
| 25 | |
| 26 | cleanup: ; 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 | |
| 32 | cleanup.cont: ; preds = %cleanup |
| 33 | br label %if.end11 |
| 34 | |
| 35 | if.end11: ; preds = %cleanup.cont, %cleanup, %land.lhs.true, %entry |
| 36 | ret void |
| 37 | |
| 38 | unreachable: ; preds = %cleanup |
| 39 | unreachable |
| 40 | } |