brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 5b25bae Raw
39 lines · plain
1; RUN: llc -verify-machineinstrs < %s | FileCheck %s2; RUN: llc -verify-machineinstrs -O0 < %s | FileCheck %s3 4target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"5target triple = "x86_64-pc-windows-msvc"6 7declare void @f(i32)8declare i32 @__C_specific_handler(...)9declare i32 @llvm.eh.exceptioncode(token)10 11define void @ehcode() personality ptr @__C_specific_handler {12entry:13  invoke void @f(i32 0)14          to label %__try.cont unwind label %catch.dispatch15 16catch.dispatch:                                   ; preds = %entry17  %cs = catchswitch within none [label %__except] unwind to caller18 19__except:                                         ; preds = %catch.dispatch20  %pad = catchpad within %cs [ptr null]21  catchret from %pad to label %__except.122 23__except.1:                                       ; preds = %__except24  %code = call i32 @llvm.eh.exceptioncode(token %pad)25  call void @f(i32 %code)26  br label %__try.cont27 28__try.cont:                                       ; preds = %entry, %__except.129  ret void30}31 32; CHECK-LABEL: ehcode:33; CHECK: xorl %ecx, %ecx34; CHECK: callq f35 36; CHECK: # %__except37; CHECK: movl %eax, %ecx38; CHECK-NEXT: callq f39