On Sat, Sep 6, 2014 at 1:50 PM, Bill Schmidt <wschm...@linux.vnet.ibm.com> wrote: > Hi, > > Here's one more case of special handling that allows us to optimize more > vectorized loops in analyze_swaps. UNSPEC_VSPLT_DIRECT is used in some > cases to avoid the possibility of an endian fixup. We can still handle > this by swapping the lane chosen as the source of the splat. > > While implementing this I realized that I had had a thinko with the > adjust_extract changes in the last related patch. When swapping > doublewords, the right change is to add or subtract n_elts/2, not to > subtract from n_elts-1. I've corrected that issue herein as well. > > I've added a new test to demonstrate the UNSPEC_VSPLT_DIRECT case. > > Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no > regressions. Ok for trunk? > > Thanks, > Bill > > > [gcc] > > 2014-09-06 Bill Schmidt <wschm...@linux.vnet.ibm.com> > > * config/rs6000/rs6000.c (special_handling_values): Add SH_SPLAT. > (rtx_is_swappable_p): Convert UNSPEC cascading ||s to a switch > statement; allow optimization of UNSPEC_VSPLT_DIRECT with special > handling SH_SPLAT. > (adjust_extract): Fix test for VEC_DUPLICATE case; fix adjustment > of extracted lane. > (adjust_splat): New function. > (handle_special_swappables): Call adjust_splat for SH_SPLAT. > (dump_swap_insn_table): Add case for SH_SPLAT. > > [gcc/testsuite] > > 2014-09-06 Bill Schmidt <wschm...@linux.vnet.ibm.com> > > * gcc.target/powerpc/swaps-p8-16.c: New test.
Okay. thanks, David