diff options
Diffstat (limited to 'llvm/test/Transforms/PruneEH/musttail.ll')
-rw-r--r-- | llvm/test/Transforms/PruneEH/musttail.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Transforms/PruneEH/musttail.ll b/llvm/test/Transforms/PruneEH/musttail.ll new file mode 100644 index 00000000000..1ad607713c6 --- /dev/null +++ b/llvm/test/Transforms/PruneEH/musttail.ll @@ -0,0 +1,15 @@ +; RUN: opt -prune-eh -S < %s | FileCheck %s + +declare void @noreturn() + +define void @testfn() { + ; A musttail call must be followed by (optional bitcast then) ret, + ; so make sure we don't insert an unreachable + ; CHECK: musttail call void @noreturn + ; CHECK-NOT: unreachable + ; CHECK-NEXT: ret void + musttail call void @noreturn() #0 + ret void +} + +attributes #0 = { noreturn } |