https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93447
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |102138
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> The
> # RANGE [-35, 0] NONZERO 4294967261
> # d_5 = PHI <0(2), -35(3)>
> _4 = d_5 != 0;
> # RANGE [0, 1] NONZERO 1
> _12 = (int) _4;
> return _12;
> to:
> # RANGE [-35, 0] NONZERO 4294967261
> # d_5 = PHI <0(2), -35(3)>
> # RANGE [0, 1] NONZERO 1
> # prephitmp_13 = PHI <0(2), 1(3)>
> return prephitmp_13;
> optimization is performed by PRE, which is enabled also for -Os, so not sure
> why it doesn't trigger here.
> Richard?
That is basically the same thing as PR 102138 is asking.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102138
[Bug 102138] t = a==0 and a = PHI<0, t> should be done earlier than PRE