diff options
Diffstat (limited to 'test/Transforms/DeadArgElim/musttail-caller.ll')
-rw-r--r-- | test/Transforms/DeadArgElim/musttail-caller.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Transforms/DeadArgElim/musttail-caller.ll b/test/Transforms/DeadArgElim/musttail-caller.ll new file mode 100644 index 00000000000..981326bba0a --- /dev/null +++ b/test/Transforms/DeadArgElim/musttail-caller.ll @@ -0,0 +1,16 @@ +; RUN: opt -deadargelim -S < %s | FileCheck %s +; PR36441 +; Dead arguments should not be removed in presence of `musttail` calls. + +; CHECK-LABEL: define internal void @test(i32 %a, i32 %b) +; CHECK: musttail call void @foo(i32 %a, i32 0) +; FIXME: we should replace those with `undef`s +define internal void @test(i32 %a, i32 %b) { + musttail call void @foo(i32 %a, i32 0) + ret void +} + +; CHECK-LABEL: define internal void @foo(i32 %a, i32 %b) +define internal void @foo(i32 %a, i32 %b) { + ret void +} |