On Fri, Nov 15, 2013 at 12:45 PM, Bill Schmidt <wschm...@linux.vnet.ibm.com> wrote: > Hi, > > A previous patch of mine was misguided. It modified the altivec_vperm_* > patterns to use the little endian conversion trick of reversing the > input operands and complementing the permute control vector. > > Looking at the Altivec manual, we really can't do this. These patterns > need to be direct pass-throughs to the vperm instruction, as shown in > Figure 4-95 on page 130 of > http://www.freescale.com/files/32bit/doc/ref_manual/ALTIVECPIM.pdf. > Section 4.2 on page 49 confirms that big-endian byte ordering is to be > used with the Altivec instruction descriptions. > > This patch reverts that specific change, cleans up some associated > commentary in another part, and modifies the one test case affected by > the change. gcc.dg/vmx/3b-15.c performs the argument reversal and > control vector complementing in the source code, as all users will need > to do when porting code containing vec_perm calls to little endian. > > Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu with no > regressions. Is this ok for trunk? > > Thanks, > Bill > > > gcc: > > 2013-11-15 Bill Schmidt <wschm...@linux.vnet.ibm.com> > > * config/rs6000/altivec.md (UNSPEC_VPERM_X, UNSPEC_VPERM_UNS_X): > Remove. > (altivec_vperm_<mode>): Revert earlier little endian change. > (*altivec_vperm_<mode>_internal): Remove. > (altivec_vperm_<mode>_uns): Revert earlier little endian change. > (*altivec_vperm_<mode>_uns_internal): Remove. > * config/rs6000/vector.md (vec_realign_load_<mode>): Revise > commentary. > > gcc/testsuite: > > 2013-11-15 Bill Schmidt <wschm...@linux.vnet.ibm.com> > > * gcc.dg/vmx/3b-15.c: Revise for little endian.
Okay. Thanks, David