[PATCH] D19209: [SCEV] Extract out a `isSCEVExprNeverPoison` helper; NFCI

Bjarke Hammersholt Roune via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 16:50:09 PDT 2016


broune accepted this revision.
This revision is now accepted and ready to land.

================
Comment at: lib/Analysis/ScalarEvolution.cpp:4782
@@ -4779,2 +4781,3 @@
+      InnermostContainingLoop->getHeader() != I->getParent())
     return SCEV::FlagAnyWrap;
 
----------------
return false;

================
Comment at: lib/Analysis/ScalarEvolution.cpp:4806
@@ +4805,3 @@
+      for (unsigned OtherOpIndex = 0; OtherOpIndex < I->getNumOperands();
+           ++OtherOpIndex)
+        if (OtherOpIndex != OpIndex) {
----------------
I'd prefer adding braces for this multi-line for loop.

================
Comment at: lib/Analysis/ScalarEvolution.cpp:4810
@@ +4809,3 @@
+          if (!isLoopInvariant(OtherOp, AddRec->getLoop()))
+            return false;
+        }
----------------
This and the next return has different behavior when adding two AddRec's as then the function will always return after considering the first one as the Op but the previous code considered both.

================
Comment at: lib/Analysis/ScalarEvolution.cpp:4813
@@ -4807,1 +4812,3 @@
+
+      return isGuaranteedToExecuteForEveryIteration(I, AddRec->getLoop());
     }
----------------
This has different behavior when adding two AddRec's as then the function will always return after considering the first one as the Op but before it considered both.


http://reviews.llvm.org/D19209





More information about the llvm-commits mailing list