Hi, When possible, we translate VEC_PERM_EXPRs into vector splat operations. A previous patch fixed this up for little endian, but there was an oversight for V16QI mode. This patch fixes that oversight. This fixes the failing test gcc.dg/torture/vshuf-v16qi.c.
Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu using --with-cpu=power7 with no regressions. Is this ok for trunk? Thanks, Bill 2013-11-19 Bill Schmidt <wschm...@linux.vnet.ibm.com> * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Adjust V16QI vector splat case for little endian. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 205002) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -29849,6 +29849,8 @@ altivec_expand_vec_perm_const (rtx operands[4]) break; if (i == 16) { + if (!BYTES_BIG_ENDIAN) + elt = 15 - elt; emit_insn (gen_altivec_vspltb (target, op0, GEN_INT (elt))); return true; }