diff options
| author | Eric Christopher <echristo@gmail.com> | 2019-04-17 04:52:47 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2019-04-17 04:52:47 +0000 |
| commit | cee313d288a4faf0355d76fb6e0e927e211d08a5 (patch) | |
| tree | d386075318d761197779a96e5d8fc0dc7b06342b /llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll | |
| parent | c3d6a929fdd92fd06d4304675ade8d7210ee711a (diff) | |
| download | bcm5719-llvm-cee313d288a4faf0355d76fb6e0e927e211d08a5.tar.gz bcm5719-llvm-cee313d288a4faf0355d76fb6e0e927e211d08a5.zip | |
Revert "Temporarily Revert "Add basic loop fusion pass.""
The reversion apparently deleted the test/Transforms directory.
Will be re-reverting again.
llvm-svn: 358552
Diffstat (limited to 'llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll')
| -rw-r--r-- | llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll b/llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll new file mode 100644 index 00000000000..53daa8292da --- /dev/null +++ b/llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll @@ -0,0 +1,24 @@ +; RUN: opt < %s -simplifycfg -S | FileCheck %s +; Test that statepoint intrinsic is marked with Throwable attribute and it is +; not optimized into call + +declare i64 addrspace(1)* @gc_call() +declare token @llvm.experimental.gc.statepoint.p0f_p1i64f(i64, i32, i64 addrspace(1)* ()*, i32, i32, ...) +declare i32* @fake_personality_function() + +define i32 @test() gc "statepoint-example" personality i32* ()* @fake_personality_function { +; CHECK-LABEL: test +entry: + ; CHECK-LABEL: entry: + ; CHECK-NEXT: %sp = invoke token (i64, i32, i64 addrspace(1)* ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64f + %sp = invoke token (i64, i32, i64 addrspace(1)* ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64f(i64 0, i32 0, i64 addrspace(1)* ()* @gc_call, i32 0, i32 0, i32 0, i32 0) + to label %normal unwind label %exception + +exception: + %lpad = landingpad { i8*, i32 } + cleanup + ret i32 0 + +normal: + ret i32 1 +} |

