1 ; RUN: llc < %s | FileCheck %s
3 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-pc-windows-msvc"
7 declare i32 @__C_specific_handler(...)
8 declare i32 @llvm.eh.exceptioncode(token)
10 define void @ehcode() personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) {
13 to label %__try.cont unwind label %catch.dispatch
15 catch.dispatch: ; preds = %entry
16 %pad = catchpad [i8* null]
17 to label %__except unwind label %catchendblock
19 __except: ; preds = %catch.dispatch
20 catchret %pad to label %__except.1
22 __except.1: ; preds = %__except
23 %code = call i32 @llvm.eh.exceptioncode(token %pad)
24 call void @f(i32 %code)
27 __try.cont: ; preds = %entry, %__except.1
30 catchendblock: ; preds = %catch.dispatch
31 catchendpad unwind to caller
34 ; CHECK-LABEL: ehcode:
35 ; CHECK: xorl %ecx, %ecx
40 ; CHECK-NEXT: movl %eax, %ecx