Message ID | 1384900915.7386.6.camel@oc8801110288.ibm.com |
---|---|
State | New |
Headers | show |
On Tue, Nov 19, 2013 at 5:41 PM, Bill Schmidt <wschmidt@linux.vnet.ibm.com> wrote: > 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 <wschmidt@linux.vnet.ibm.com> > > * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Adjust > V16QI vector splat case for little endian. Okay. Thanks, David
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; }