[PATCH] D104503: [SCEV] Don't require dominance ordering of add/mul/min/max expressions
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 1 10:26:44 PDT 2021
efriedma added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:754
return 1;
- else
- assert(DT.dominates(RHead, LHead) &&
- "No dominance between recurrences used by one SCEV?");
- return -1;
+ else if (DT.dominates(RHead, LHead))
+ return -1;
----------------
reames wrote:
> efriedma wrote:
> > I'm not sure this produces a strict weak ordering suitable for sorting. We've run into issues with other code that tries to sort on dominates(). The solution is usually to use domtree DFS numbering instead.
> I'm happy to make the change, but do you have an example? I don't see how we'd end up with anything problematic here.
For example, D103441
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104503/new/
https://reviews.llvm.org/D104503
More information about the llvm-commits
mailing list