[PATCH] D33121: [SCEV] Fix sorting order for AddRecExprs
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 15 22:13:11 PDT 2017
mkazantsev added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:638
+ assert(LHead != RHead && "Two loops share the same header?");
+ if (DT.dominates(LHead, RHead))
+ return 1;
----------------
sanjoy wrote:
> Can we assert `DT.dominates(LHead, RHead) || DT.dominates(RHead, LHead)` here?
Yes, I thought of that. It should be true as long as we only use this method to compare operands of one instruction. I propose to land this as is, and then I'll make a follow-up patch with this change. This will allow us to separate the potential problems (if any of these changes can bring them).
https://reviews.llvm.org/D33121
More information about the llvm-commits
mailing list