[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 06:48:51 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:
Why are we using the SCEV of Dominatee here, rather than CandidateExpr? I'm not familiar with this pass, but from a cursory look what we're actually replacing is CandidateExpr, while Dominatee acts as a context instruction.
https://github.com/llvm/llvm-project/pull/98156
More information about the llvm-commits
mailing list