David Majnemer | 9789023 | 2015-09-17 20:45:18 +0000 | [diff] [blame^] | 1 | ; RUN: llc -mtriple=x86_64-windows-msvc < %s | FileCheck %s |
| 2 | |
| 3 | target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" |
| 4 | target triple = "x86_64-pc-windows-msvc" |
| 5 | |
| 6 | define void @f(i1 %B) personality i32 (...)* @__CxxFrameHandler3 { |
| 7 | entry: |
| 8 | invoke void @g() |
| 9 | to label %unreachable unwind label %catch.dispatch |
| 10 | |
| 11 | catch.dispatch: |
| 12 | %cp = catchpad [i8* null, i32 64, i8* null] |
| 13 | to label %catch unwind label %catchendblock |
| 14 | |
| 15 | catch: |
| 16 | br i1 %B, label %catchret, label %catch |
| 17 | |
| 18 | catchret: |
| 19 | catchret %cp to label %try.cont |
| 20 | |
| 21 | try.cont: |
| 22 | ret void |
| 23 | |
| 24 | catchendblock: |
| 25 | catchendpad unwind to caller |
| 26 | |
| 27 | unreachable: |
| 28 | unreachable |
| 29 | } |
| 30 | |
| 31 | ; CHECK-LABEL: f: |
| 32 | |
| 33 | ; The entry funclet contains %entry and %try.cont |
| 34 | ; CHECK: # %entry |
| 35 | ; CHECK: # %try.cont |
| 36 | ; CHECK: retq |
| 37 | |
| 38 | ; The catch funclet contains %catch and %catchret |
| 39 | ; CHECK: # %catch |
| 40 | ; CHECK: # %catchret |
| 41 | ; CHECK: retq |
| 42 | |
| 43 | declare void @g() |
| 44 | |
| 45 | declare i32 @__CxxFrameHandler3(...) |