1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
2 ; RUN: llc -verify-machineinstrs -O0 < %s | FileCheck %s
4 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
5 target triple = "x86_64-pc-windows-msvc"
8 declare i32 @__C_specific_handler(...)
9 declare i32 @llvm.eh.exceptioncode(token)
11 define void @ehcode() personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) {
14 to label %__try.cont unwind label %catch.dispatch
16 catch.dispatch: ; preds = %entry
17 %pad = catchpad [i8* null]
18 to label %__except unwind label %catchendblock
20 __except: ; preds = %catch.dispatch
21 catchret %pad to label %__except.1
23 __except.1: ; preds = %__except
24 %code = call i32 @llvm.eh.exceptioncode(token %pad)
25 call void @f(i32 %code)
28 __try.cont: ; preds = %entry, %__except.1
31 catchendblock: ; preds = %catch.dispatch
32 catchendpad unwind to caller
35 ; CHECK-LABEL: ehcode:
36 ; CHECK: xorl %ecx, %ecx
39 ; CHECK: # %catch.dispatch
40 ; CHECK: movl %eax, %ecx