[llvm] [CGP] Do not fold ret value if constant in `dupRetToEnableTailCallOpts` (PR #76613)
    Yingwei Zheng via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sat Dec 30 05:40:55 PST 2023
    
    
  
================
@@ -2532,7 +2532,8 @@ bool CodeGenPrepare::dupRetToEnableTailCallOpts(BasicBlock *BB,
     }
 
     PN = dyn_cast<PHINode>(V);
-    if (!PN)
+
+    if (isa<Constant>(V))
----------------
dtcxzyw wrote:
Could you please move this line before the `dyn_cast<PHINode>` call?
https://github.com/llvm/llvm-project/pull/76613
    
    
More information about the llvm-commits
mailing list