[llvm] [InstCombine] Support well-defined recurrences in isGuaranteedNotToBeUndefOrPoison (PR #150420)

Cullen Rhodes via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 05:50:30 PDT 2025


================
@@ -7657,6 +7720,13 @@ static bool isGuaranteedNotToBeUndefOrPoison(
       }
       if (IsWellDefined)
         return true;
+
+      bool StartNeedsFreeze;
+      if (canFoldFreezeIntoRecurrence(
+              const_cast<PHINode *>(PN), const_cast<DominatorTree *>(DT),
----------------
c-rhodes wrote:

ah yes, good spot it's not necessary for `DominatorTree`

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


More information about the llvm-commits mailing list