[PATCH] D13177: [Bug 24848] Use range metadata to constant fold comparisons between two values

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 16:55:08 PDT 2015


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

Minor request below, otherwise, LGTM.


================
Comment at: lib/Analysis/InstructionSimplify.cpp:2422
@@ +2421,3 @@
+      auto Satisfied_CR = ConstantRange::makeSatisfyingICmpRegion(Pred, RHS_CR);
+      auto InversedSatisfied_CR = ConstantRange::makeSatisfyingICmpRegion(
+          CmpInst::getInversePredicate(Pred), RHS_CR);
----------------
Move this below the check for Satisfied_CR.contains. No need to construct an object we'll never use.



http://reviews.llvm.org/D13177





More information about the llvm-commits mailing list