On Sun, Dec 11, 2011 at 3:13 PM, Georg-Johann Lay <a...@gjlay.de> wrote:
> If there was a canonical representation of these operations, a backend
> wouldn't even notice if the tree passes chose a different, more convenient
> canonicalization.


The problem is not just the canonicalization but rather there is a
problem of deciding which regression is important and how to fix it.
Fixing this regression was easy as it just meant to turn back on the
optimization that was there already.  So after fixing this regression,
we have another regression with the AVR back-end.  I bet the best way
to fix this is to ask the back-end what is the cost of doing a shift
and if it is greater than doing an and with a setcc, then we should do
the and/setcc rather than a shift with the and.  It is not hard to add
a target hook for this case, I can do it if the AVR folks think it
would be useful.

Thanks,
Andrew Pinski

Reply via email to