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 %cs = catchswitch within none [label %__except] unwind to caller
19 __except: ; preds = %catch.dispatch
20 %pad = catchpad within %cs [i8* null]
21 catchret from %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
32 ; CHECK-LABEL: ehcode:
33 ; CHECK: xorl %ecx, %ecx
37 ; CHECK: movl %eax, %ecx