[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
Tue Jun 29 11:44:08 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;
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104503/new/
https://reviews.llvm.org/D104503
More information about the llvm-commits
mailing list