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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
           Severity|normal                      |enhancement

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Kang-Che Sung from comment #4)
> I don't know if GCC
> can do this internally. If GCC can't do this for now, that's OK for me (the
> example I posted can be rewritten to another pattern that might produce even
> smaller code in x86). But maybe label this as a WONTFIX and not INVALID?

The way GCC tracks the flags register is either clobber or set. Almost never
merge. In the case of the shift it is either set (for constant case) or
clobber. 
Changing this will almost surely be a very invasive patch to the backend for a
very small gain. I will leave it up to the target maintainers to decide if they
want to do it or not.

Reply via email to