The nuw constraint will not be satisfied unless <expr> == 0.
This bug has been around since r102234 (in 2010!), but was uncovered by
r251052, which introduced more aggressive optimization of nuw scev expressions.
Paths
| Differential D14850
ScalarEvolution: do not set nuw when creating exprs of form <expr> + <all-ones>. ClosedPublic Authored by pcc on Nov 19 2015, 4:58 PM.
Details Summary The nuw constraint will not be satisfied unless <expr> == 0. This bug has been around since r102234 (in 2010!), but was uncovered by
Diff Detail Event Timeline
sanjoy edited edge metadata. Comment ActionsLGTM, good catch!
This revision is now accepted and ready to land.Nov 19 2015, 5:23 PM Closed by commit rL253627: ScalarEvolution: do not set nuw when creating exprs of form <expr> + <all-ones>. (authored by pcc). · Explain WhyNov 19 2015, 5:29 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 40720 lib/Analysis/ScalarEvolution.cpp
test/Transforms/IndVarSimplify/zext-nuw.ll
|
Just to double check: this one is safe right?