llvm.org GIT mirror llvm / 575121d
[OperandBundles] Have TailCallElim play nice with operand bundles A call site's use of a Value might not correspond to an argument operand but to a bundle operand. This fixes PR25928. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256328 91177308-0d34-0410-b5e6-96231b3b80d8 David Majnemer 3 years ago
2 changed file(s) with 12 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
196196 case Instruction::Call:
197197 case Instruction::Invoke: {
198198 CallSite CS(I);
199 bool IsNocapture = !CS.isCallee(U) &&
200 CS.doesNotCapture(CS.getArgumentNo(U));
199 bool IsNocapture =
200 CS.isDataOperand(U) && CS.doesNotCapture(CS.getDataOperandNo(U));
201201 callUsesLocalStack(CS, IsNocapture);
202202 if (IsNocapture) {
203203 // If the alloca-derived argument is passed in as nocapture, then it
187187 ; CHECK: call void @test11_helper2
188188 ret void
189189 }
190
191 ; PR25928
192 define void @test12() {
193 entry:
194 ; CHECK-LABEL: @test12
195 ; CHECK: {{^ *}} call void undef(i8* undef) [ "foo"(i8* %e) ]
196 %e = alloca i8
197 call void undef(i8* undef) [ "foo"(i8* %e) ]
198 unreachable
199 }