[PATCH] D14850: ScalarEvolution: do not set nuw when creating exprs of form <expr> + <all-ones>.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 17:12:40 PST 2015
pcc added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:7031
@@ -7030,3 +7030,3 @@
RHS = getAddExpr(getConstant(RHS->getType(), (uint64_t)-1, true), RHS,
SCEV::FlagNSW);
Pred = ICmpInst::ICMP_SGT;
----------------
hans wrote:
> Just to double check: this one is safe right?
I believe so. In this case the nsw condition will only fail if RHS is the minimum signed value, and the if condition on line 7029 checks that the range of RHS is such that this cannot happen.
http://reviews.llvm.org/D14850
More information about the llvm-commits
mailing list