brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · dbe9e9d Raw
68 lines · plain
1; RUN: llc < %s | FileCheck %s2target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"3target triple = "x86_64-pc-windows-msvc"4 5define void @test1(ptr %result.repack) personality ptr @__CxxFrameHandler3 {6bb:7  invoke void @may_throw(i32 1)8          to label %postinvoke unwind label %cleanuppad9; CHECK:         movq    %rcx, [[SpillLoc:.*\(%rbp\)]]10; CHECK:        movl    $1, %ecx11; CHECK:        callq   may_throw12 13postinvoke:                                       ; preds = %bb14  store i64 19, ptr %result.repack, align 815; CHECK:        movq	[[SpillLoc]], [[R1:%r..]]16; CHECK:        movq    $19, ([[R1]])17; CHECK:        movl    $2, %ecx18; CHECK-NEXT:   callq   may_throw19  invoke void @may_throw(i32 2)20          to label %assertFailed unwind label %catch.dispatch21 22catch.dispatch:                                   ; preds = %cleanuppad9, %postinvoke23  %tmp3 = catchswitch within none [label %catch.object.Throwable] unwind label %cleanuppad24 25catch.object.Throwable:                           ; preds = %catch.dispatch26  %tmp2 = catchpad within %tmp3 [ptr null, i32 64, ptr null]27  catchret from %tmp2 to label %catchhandler28 29catchhandler:                                     ; preds = %catch.object.Throwable30  invoke void @may_throw(i32 3)31          to label %try.success.or.caught unwind label %cleanuppad32 33try.success.or.caught:                            ; preds = %catchhandler34  invoke void @may_throw(i32 4)35          to label %postinvoke27 unwind label %cleanuppad2436; CHECK:        movl    $4, %ecx37; CHECK-NEXT:   callq   may_throw38 39postinvoke27:                                     ; preds = %try.success.or.caught40  store i64 42, ptr %result.repack, align 841; CHECK:        movq    [[SpillLoc]], [[R2:%r..]]42; CHECK-NEXT:   movq    $42, ([[R2]])43  ret void44 45cleanuppad24:                                     ; preds = %try.success.or.caught46  %tmp5 = cleanuppad within none []47  cleanupret from %tmp5 unwind to caller48 49cleanuppad:                                       ; preds = %catchhandler, %catch.dispatch, %bb50  %tmp1 = cleanuppad within none []51  cleanupret from %tmp1 unwind to caller52 53assertFailed:                                     ; preds = %postinvoke54  invoke void @may_throw(i32 5)55          to label %postinvoke13 unwind label %cleanuppad956 57postinvoke13:                                     ; preds = %assertFailed58  unreachable59 60cleanuppad9:                                      ; preds = %assertFailed61  %tmp4 = cleanuppad within none []62  cleanupret from %tmp4 unwind label %catch.dispatch63}64 65declare void @may_throw(i32)66 67declare i32 @__CxxFrameHandler3(...)68