This is the mail archive of the
mailing list for the GCC project.
combine_simplify_rtx (doesn't) commute XOR and ASHIFTRT ???
- From: Alan Lawrence <alan dot lawrence at arm dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 24 Jun 2014 14:42:00 +0100
- Subject: combine_simplify_rtx (doesn't) commute XOR and ASHIFTRT ???
- Authentication-results: sourceware.org; auth=none
I'm looking at git commit ea1ac559 / svn r76965, January 2014 (archive:
https://gcc.gnu.org/ml/gcc-patches/2004-01/msg03406.html), which prevents
(ashiftrt (xor A C1) C2)
from being commuted to
(xor (ashiftrt A C2) (ashiftrt C1 C2))
and wondering if anyone can explain to me what's wrong with this transformation.
Having worked through all four cases of A and C1 positive and negative, it seems
to me that the extra bits 'fed in' to the most-significant end of the result are
the same either way (i.e. the XOR of the sign bits of A and C1).
Re-enabling this transformation improves rtx simplification and codegen on
AArch64, for one.
(I don't have easy access to Alpha/VMS machine on which to test Ada s-crc32.adb.)
Thanks for any info, Alan