[PATCH] D40953: [SCEV] Fix predicate usage in computeExitLimitFromICmp

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 22:34:27 PST 2017


sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.

lgtm!



================
Comment at: lib/Analysis/ScalarEvolution.cpp:7061
     Cond = ExitCond->getInversePredicate();
+  ICmpInst::Predicate OriginalCond = Cond;
 
----------------
If possible, I'd suggest also cleaning this up a bit -- the variable should be called `Pred` and not `Cond` (a later NFC change is fine).

Also, how about making `OriginalCond` `const` so that it obviously can't be modified?


https://reviews.llvm.org/D40953





More information about the llvm-commits mailing list