[PATCH] D42953: [SCEV] Make getPostIncExpr guaranteed to return AddRec

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 11 20:09:25 PST 2018


mkazantsev added inline comments.


================
Comment at: lib/Analysis/ScalarEvolution.cpp:10232
+    Ops.push_back(SE.getAddExpr(getOperand(i), getOperand(i + 1)));
+  // We know that the last operand is not a constant zero (otherwise it would
+  // have been popped out earlier). This guarantees us that if the result has
----------------
sanjoy wrote:
> "We know that the last operand is not a constant zero" -> might be nice to assert this.
Will do.


https://reviews.llvm.org/D42953





More information about the llvm-commits mailing list