[llvm] [CGP] Permit tail call optimization on undefined return value (PR #82419)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 16:57:01 PST 2024
================
@@ -2686,8 +2686,9 @@ bool CodeGenPrepare::dupRetToEnableTailCallOpts(BasicBlock *BB,
attributesPermitTailCall(F, CI, RetI, *TLI)) {
// Either we return void or the return value must be the first
// argument of a known intrinsic or library function.
- if (!V || (isIntrinsicOrLFToBeTailCalled(TLInfo, CI) &&
- V == CI->getArgOperand(0))) {
+ if (!V || isa<UndefValue>(V) ||
----------------
topperc wrote:
Could we just leave V as nullptr back at line 2602?
https://github.com/llvm/llvm-project/pull/82419
More information about the llvm-commits
mailing list