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

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 16:54:24 PST 2018


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

lgtm



================
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
----------------
"We know that the last operand is not a constant zero" -> might be nice to assert this.


https://reviews.llvm.org/D42953





More information about the llvm-commits mailing list