I would like to propose the following iv optimization, that is now made
legitimate thank to -fstrict-overflow.
This patch improves the computation of the final value of the loop's
control variable when the signed initial value of the scalar evolution
for iv1 is relative to the scalar evolution for iv0, like in
for (i = iv0->base ; i < iv1->base ; i++) with iv1->base = iv0->base+Cst
This allows to optimize loops like :
for (i = start; i <= start+1; i++) ...
I know it looks stupid as a test case, but this pattern happens in
Dhrystone...
Another minor change in this patch is the addition of
FLAG_OVERFLOW_UNDEFINED to avoid testing the overflow flags for each
type like in :
if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (op0))
|| TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (op1)))
return false;