[llvm] [CGP] Consider arguments and ret values in `dupRetToEnableTailCallOpts` (PR #76613)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 11 22:08:29 PST 2024


================
@@ -2580,7 +2611,7 @@ bool CodeGenPrepare::dupRetToEnableTailCallOpts(BasicBlock *BB,
     }
 
     PN = dyn_cast<PHINode>(V);
-    if (!PN)
+    if (!PN && !isa<Argument>(V) && !isa<CallInst>(V))
----------------
antoniofrighetto wrote:

Yes, now looks reasonable to drop the whole check after further restricting the !PN path.

https://github.com/llvm/llvm-project/pull/76613


More information about the llvm-commits mailing list