xref: /llvm-project/llvm/test/Transforms/DeadArgElim/musttail-caller.ll (revision e76ecbb0f36441b2d84908f907369b6dcfc26163)
1; RUN: opt -passes=deadargelim -S < %s | FileCheck %s
2; PR36441
3; Dead arguments should not be removed in presence of `musttail` calls.
4
5; CHECK-LABEL: define internal void @test(i32 %a, i32 %b)
6; CHECK: musttail call void @foo(i32 %a, i32 0)
7; FIXME: we should replace those with `undef`s
8define internal void @test(i32 %a, i32 %b) {
9  musttail call void @foo(i32 %a, i32 0)
10  ret void
11}
12
13; CHECK-LABEL: define internal void @foo(i32 %a, i32 %b)
14define internal void @foo(i32 %a, i32 %b) {
15  ret void
16}
17