This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Lno branch merge part 8 -- canonical induction variable creation
Hello,
> Also check the use of !flag_wrapv in the old RTL loop
> optimizers that use it to transform loops assuming bivs don't overflow.
there is exactly one reference to flag_wrapv in old loop optimizer,
which is not terribly enlightening:
case SIGN_EXTEND:
/* Ignore this BIV if signed arithmetic overflow is defined. */
if (flag_wrapv)
return 0;
...
Nevertheless, any checking for flag_wrapv/flag_trapv on RTL level is
completely pointless (and wrong), since we already lost any information
about the signedness of the operands. We have it preserved on some
places where it semantically matters (division, comparisons, sign
extends), but signed operations very well may (and sometimes do)
manipulate values that originally were unsigned and vice versa.
Zdenek