https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #0)
> ... but then
> comes dom2 and happily replaces
>   _1 = 3.4028234663852885981170418348451692544e+38 * 2.0e+0;
>   return _1;
> with
>   _1 = 3.4028234663852885981170418348451692544e+38 * 2.0e+0;
>   return  Inf;
> (I think this is still correct)

Note this is also a pessimization code-generation wise since if we
preserve the multiplication the result is readily available in a
register but as optimized we have another constant pool entry and load.

So we might want to consider not propagating constants generated by operations
we cannot eliminate.  If the only consumer is a compare-and-branch we
can of course still end up with a seemingly dead stmt, so this would be only
for the missed optimization.

Reply via email to