Manman Ren | 5e5974f | 2013-02-27 02:11:57 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -mtriple=armv7-apple-ios | FileCheck %s |
| 2 | ; This testcase makes sure we can handle invoke @llvm.donothing without |
| 3 | ; assertion failure. |
| 4 | ; rdar://problem/13228754 |
| 5 | ; CHECK: .globl _main |
| 6 | |
| 7 | declare void @callA() |
| 8 | declare i32 @__gxx_personality_sj0(...) |
| 9 | |
| 10 | define void @main() { |
| 11 | invoke.cont: |
| 12 | invoke void @callA() |
| 13 | to label %invoke.cont25 unwind label %lpad2 |
| 14 | invoke.cont25: |
| 15 | invoke void @llvm.donothing() |
| 16 | to label %invoke.cont27 unwind label %lpad15 |
| 17 | |
| 18 | invoke.cont27: |
| 19 | invoke void @callB() |
| 20 | to label %invoke.cont75 unwind label %lpad15 |
| 21 | |
| 22 | invoke.cont75: |
| 23 | ret void |
| 24 | |
| 25 | lpad2: |
| 26 | %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) |
| 27 | cleanup |
| 28 | br label %eh.resume |
| 29 | |
| 30 | lpad15: |
| 31 | %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) |
| 32 | cleanup |
| 33 | br label %eh.resume |
| 34 | |
| 35 | eh.resume: |
| 36 | resume { i8*, i32 } zeroinitializer |
| 37 | } |
| 38 | |
| 39 | declare void @callB() |
| 40 | declare void @llvm.donothing() nounwind readnone |