On Sun, Jan 25, 2015 at 7:44 PM, Bill Schmidt <wschm...@linux.vnet.ibm.com> wrote: > Hi, > > A not uncommon idiom on Power for vector floating-point computation is > used to convert a double-precision value to single-precision and copy it > to all elements of a vector float. For this we see a specific convert > UNSPEC feeding an xxspltw pattern that copies from BE element zero. > Since all elements of the result are the same regardless of whether > swaps are present, this should not kill the vector swap removal > optimization for the containing computation. This patch permits that. > > The issue was reported privately to me, and I have created a test case > that reduces and anonymizes the original code. > > Is this ok for trunk after GCC 5 branches? I would also like to > backport it to GCC 5 subsequently. > > Thanks, > Bill > > > [gcc] > > 2015-01-25 Bill Schmidt <wschm...@linux.vnet.ibm.com> > > * config/rs6000/rs6000.c (rtx_is_swappable_p): Commentary > adjustments. > (insn_is_swappable_p): Return 1 for a convert from double to > single precision when all of its uses are splats of BE element > zero. > > [gcc/testsuite] > > 2015-01-25 Bill Schmidt <wschm...@linux.vnet.ibm.com> > > * gcc.target/powerpc/swaps-p8-18.c: New test.
This is okay for GCC when trunk re-opens and backporting to GCC 5, and maybe 4.9 also. Thanks, David