diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2018-12-18 22:09:15 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2018-12-18 22:09:15 +0000 |
| commit | 84758ead22fdbf0bd4c41f3c5c3d55640d0d367b (patch) | |
| tree | 598f728964c202146bcc445f0350b6cdd1480540 /llvm/test/Transforms | |
| parent | 1455d4e155e13eec19e530407391162f42122548 (diff) | |
| download | bcm5719-llvm-84758ead22fdbf0bd4c41f3c5c3d55640d0d367b.tar.gz bcm5719-llvm-84758ead22fdbf0bd4c41f3c5c3d55640d0d367b.zip | |
[InstCombine] auto-generate complete checks; NFC
llvm-svn: 349548
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/sink-into-catchswitch.ll | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/llvm/test/Transforms/InstCombine/sink-into-catchswitch.ll b/llvm/test/Transforms/InstCombine/sink-into-catchswitch.ll index 04a62250fc5..893bf2b16f7 100644 --- a/llvm/test/Transforms/InstCombine/sink-into-catchswitch.ll +++ b/llvm/test/Transforms/InstCombine/sink-into-catchswitch.ll @@ -1,16 +1,39 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt -instcombine -S < %s | FileCheck %s + target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-windows-msvc18.0.0" %struct.B = type { i64, i64 } define void @test1(%struct.B* %p) personality i32 (...)* @__CxxFrameHandler3 { +; CHECK-LABEL: @test1( +; CHECK-NEXT: invoke.cont: +; CHECK-NEXT: [[TMP0:%.*]] = bitcast %struct.B* [[P:%.*]] to <2 x i64>* +; CHECK-NEXT: [[TMP1:%.*]] = load <2 x i64>, <2 x i64>* [[TMP0]], align 8 +; CHECK-NEXT: [[TMP2:%.*]] = extractelement <2 x i64> [[TMP1]], i32 0 +; CHECK-NEXT: invoke void @throw() +; CHECK-NEXT: to label [[UNREACHABLE:%.*]] unwind label [[CATCH_DISPATCH:%.*]] +; CHECK: catch.dispatch: +; CHECK-NEXT: [[CS:%.*]] = catchswitch within none [label %invoke.cont1] unwind label [[EHCLEANUP:%.*]] +; CHECK: invoke.cont1: +; CHECK-NEXT: [[CATCH:%.*]] = catchpad within [[CS]] [i8* null, i32 64, i8* null] +; CHECK-NEXT: invoke void @throw() [ "funclet"(token [[CATCH]]) ] +; CHECK-NEXT: to label [[UNREACHABLE]] unwind label [[EHCLEANUP]] +; CHECK: ehcleanup: +; CHECK-NEXT: [[PHI:%.*]] = phi i64 [ [[TMP2]], [[CATCH_DISPATCH]] ], [ 9, [[INVOKE_CONT1:%.*]] ] +; CHECK-NEXT: [[CLEANUP:%.*]] = cleanuppad within none [] +; CHECK-NEXT: call void @release(i64 [[PHI]]) [ "funclet"(token [[CLEANUP]]) ] +; CHECK-NEXT: cleanupret from [[CLEANUP]] unwind to caller +; CHECK: unreachable: +; CHECK-NEXT: unreachable +; invoke.cont: %0 = bitcast %struct.B* %p to <2 x i64>* %1 = load <2 x i64>, <2 x i64>* %0, align 8 %2 = extractelement <2 x i64> %1, i32 0 invoke void @throw() - to label %unreachable unwind label %catch.dispatch + to label %unreachable unwind label %catch.dispatch catch.dispatch: ; preds = %invoke.cont %cs = catchswitch within none [label %invoke.cont1] unwind label %ehcleanup @@ -18,7 +41,7 @@ catch.dispatch: ; preds = %invoke.cont invoke.cont1: ; preds = %catch.dispatch %catch = catchpad within %cs [i8* null, i32 64, i8* null] invoke void @throw() [ "funclet"(token %catch) ] - to label %unreachable unwind label %ehcleanup + to label %unreachable unwind label %ehcleanup ehcleanup: ; preds = %invoke.cont1, %catch.dispatch %phi = phi i64 [ %2, %catch.dispatch ], [ 9, %invoke.cont1 ] @@ -30,16 +53,6 @@ unreachable: ; preds = %invoke.cont1, %invo unreachable } -; CHECK-LABEL: define void @test1( -; CHECK: %[[bc:.*]] = bitcast %struct.B* %p to <2 x i64>* -; CHECK: %[[ld:.*]] = load <2 x i64>, <2 x i64>* %[[bc]], align 8 -; CHECK: %[[ee:.*]] = extractelement <2 x i64> %[[ld]], i32 0 - -; CHECK: %[[phi:.*]] = phi i64 [ %[[ee]], {{.*}} ], [ 9, {{.*}} ] -; CHECK: call void @release(i64 %[[phi]]) - declare i32 @__CxxFrameHandler3(...) - declare void @throw() - declare void @release(i64) |

