[PATCH] D12948: [SCEV] Teach SCEV that A < B => (A+K) < (B+K) on no overflow.

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 00:56:58 PDT 2015


hfinkel added inline comments.

================
Comment at: lib/Analysis/ScalarEvolution.cpp:7299
@@ +7298,3 @@
+  // fairly deep in the call stack (i.e. is called many times).
+  //
+
----------------
Remove final // line.

================
Comment at: lib/Analysis/ScalarEvolution.cpp:7400
@@ +7399,3 @@
+  if (Pred == CmpInst::ICMP_ULT) {
+    FoundRHSLimit = APInt::getNullValue(Width) - RDiff;
+  } else {
----------------
Can't this just be -RDiff?

================
Comment at: lib/Analysis/ScalarEvolution.cpp:7408
@@ +7407,3 @@
+
+  return isLoopEntryGuardedByCond(L, Pred, FoundRHS,
+                                  getConstant(FoundRHSLimit));
----------------
Add some comment here that this is the overflow check mentioned above.


http://reviews.llvm.org/D12948





More information about the llvm-commits mailing list