[PATCH] D104503: [SCEV] Don't require dominance ordering of add/mul/min/max expressions
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 1 10:07:45 PDT 2021
reames 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;
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104503/new/
https://reviews.llvm.org/D104503
More information about the llvm-commits
mailing list