[Bug tree-optimization/41244] "&data[i] - data" isn't converted to "i"
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 4 07:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41244
--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> On the trunk (on aarch64) we get:
Yes, on I32P64 platforms we still have a chance to prove that the
multiplication doesn't overflow.
> long int _4;
> long int _5;
> int _7;
> sizetype _10;
>
> <bb 2>:
> _10 = i_6(D) w* 4;
Ah, you actually get WIDEN_MULT_EXPR on aarch64? I essentially never saw it on
other platforms... x86_64 has
_9 = (sizetype) i_6(D);
_10 = _9 * 4;
instead.
> _4 = (long int) _10;
Hmm, why doesn't that get combined with the WIDEN_MULT_EXPR? I would expect
_4 = i_6(D) w* 4;
to be valid.
> _5 = _4 /[ex] 4;
> _7 = (int) _5;
More information about the Gcc-bugs
mailing list