David Majnemer | 17525ab | 2016-02-23 07:18:15 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s | FileCheck %s |
| 2 | target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" |
| 3 | target triple = "x86_64-pc-windows-msvc18.0.0" |
| 4 | |
| 5 | ; Function Attrs: uwtable |
| 6 | define void @f() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { |
| 7 | entry: |
| 8 | invoke void @g() |
| 9 | to label %try.cont unwind label %catch.dispatch |
| 10 | |
| 11 | catch.dispatch: ; preds = %entry |
| 12 | %0 = catchswitch within none [label %catch] unwind label %ehcleanup |
| 13 | |
| 14 | catch: ; preds = %catch.dispatch |
| 15 | %1 = catchpad within %0 [i8* null, i32 64, i8* null] |
| 16 | invoke void @g() [ "funclet"(token %1) ] |
| 17 | to label %dtor.exit unwind label %catch.dispatch.i |
| 18 | |
| 19 | catch.dispatch.i: ; preds = %catch |
| 20 | %2 = catchswitch within %1 [label %catch.i] unwind to caller |
| 21 | |
| 22 | catch.i: ; preds = %catch.dispatch.i |
| 23 | %3 = catchpad within %2 [i8* null, i32 64, i8* null] |
| 24 | catchret from %3 to label %dtor.exit |
| 25 | |
| 26 | dtor.exit: |
| 27 | catchret from %1 to label %try.cont |
| 28 | |
| 29 | try.cont: |
| 30 | ret void |
| 31 | |
| 32 | ehcleanup: ; preds = %catch.dispatch |
| 33 | %4 = cleanuppad within none [] |
| 34 | call void @dtor() #1 [ "funclet"(token %4) ] |
| 35 | cleanupret from %4 unwind to caller |
| 36 | } |
| 37 | |
| 38 | declare void @g() |
| 39 | |
| 40 | declare i32 @__CxxFrameHandler3(...) |
| 41 | |
| 42 | ; Function Attrs: nounwind |
| 43 | declare void @dtor() #1 |
| 44 | |
| 45 | attributes #0 = { uwtable } |
| 46 | attributes #1 = { nounwind } |
| 47 | |
| 48 | ; CHECK-LABEL: $ip2state$f: |
| 49 | ; CHECK: -1 |
| 50 | ; CHECK: 1 |
| 51 | ; CHECK: -1 |
| 52 | ; CHECK: 4 |
| 53 | ; CHECK: 2 |
| 54 | ; CHECK: 3 |
| 55 | ; CHECK: 2 |