[llvm] [NaryReassociate] Check to avoid introducing poison when reusing SCEVs (PR #98156)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 07:03:16 PDT 2024


================
@@ -559,20 +559,31 @@ NaryReassociatePass::findClosestMatchingDominator(const SCEV *CandidateExpr,
     return nullptr;
 
   auto &Candidates = Pos->second;
+  const auto *FullExpr = SE->getSCEV(Dominatee);
----------------
nikic wrote:

But don't you want to know whether it is more poisonous than the operand being replaced, rather than Dominatee?

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


More information about the llvm-commits mailing list