[PATCH] D42312: [ARM] Cleanup part of ARMBaseInstrInfo::optimizeCompareInstr (NFCI).
Joel Galenson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 12:55:52 PST 2018
jgalenson added a comment.
> You should be able to tell which of "I != B" or "I != E" is the important exit condition before you enter the loop. Either E and I are in the same block (so `I != E` will fail before `I != B`), or they're not in the same block (so `I != E` will always be true).
Yes, that's exactly what I did, but the extra logic to do that comparison, convert them into a reverse iterator, and get the bounds conditions correct (we want to consider E and B, so that would be inclusive, and if we instead used rend() that would be exclusive) seemed more complicated to me.
https://reviews.llvm.org/D42312
More information about the llvm-commits
mailing list