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

--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #6)
> ISTM this should likely be tackled in both the gimple and RTL levels.  In
> gimple it would be a suitable match.pd pattern.  For RTL it would be
> simplify-rtx.

In simplify-rtx we only ever do transforms that always result in cheaper code,
on any arch (or canonical representation stuff of course).  Usually you need
to take the instruction costs into account, so a transform like this needs to
be done in an actual optimisation pass.

Reply via email to