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

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 06:56:21 PDT 2024


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

The pass is replacing one of the operands of `Dominatee` with `CandidateInstruction` (which has a SCEV of `CandidateExpr`). What I want to know is if `CandidateInstruction` is "more poisonous" than the original `Dominatee`.

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


More information about the llvm-commits mailing list