On Wed, Apr 24, 2013 at 5:01 AM, Alan Modra <amo...@gmail.com> wrote: > Practically all of the patterns in rs6000.md having a low-part subreg > use zero as the byte number. That's correct when little-endian, but > not when big-endian, so combine loses optimization opportunities. > > This patch duplicates the insns for big-endian. I know Segher has > been working on removing these subreg patterns, but I think he'll need > to stop combine creating low-part subregs for that to work. So until > his patch materializes, is this OK for mainline? Bootstrapped and > regression tested powerpc-linux. > > PR target/57052 > * config/rs6000/rs6000.md (rotlsi3_internal7): Rename to > rotlsi3_internal7le and condition on !BYTES_BIG_ENDIAN. > (rotlsi3_internal8be): New BYTES_BIG_ENDIAN insn. > Repeat for many other rotate/shift and mask patterns using subregs. > Name lshiftrt insns. > (ashrdisi3_noppc64): Rename to ashrdisi3_noppc64be and condition > on WORDS_BIG_ENDIAN.
This is okay, but I eagerly await Segher's patch that removes all of this. Thanks, David