diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-07-23 22:30:58 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2013-07-23 22:30:58 +0000 |
commit | a60561983f0df814863a68d87cef51ab66974864 (patch) | |
tree | e4112efa5aa26ec503c88d1bdbc76f6468fa90ef /gcc/config/rs6000 | |
parent | 9d824f6c8fcb1cf26c3fb5b508028b2bdc682f33 (diff) | |
download | gcc-a60561983f0df814863a68d87cef51ab66974864.zip gcc-a60561983f0df814863a68d87cef51ab66974864.tar.gz gcc-a60561983f0df814863a68d87cef51ab66974864.tar.bz2 |
rs6000.c (altivec_expand_vec_perm_const): Correct selection of field for vector splat in little endian mode.
2013-07-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Anton Blanchard <anton@au1.ibm.com>
* config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Correct
selection of field for vector splat in little endian mode.
Co-Authored-By: Anton Blanchard <anton@au1.ibm.com>
From-SVN: r201193
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 8c3cf97..7729188 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -28460,9 +28460,10 @@ altivec_expand_vec_perm_const (rtx operands[4]) break; if (i == 16) { + int field = BYTES_BIG_ENDIAN ? elt / 2 : 7 - elt / 2; x = gen_reg_rtx (V8HImode); emit_insn (gen_altivec_vsplth (x, gen_lowpart (V8HImode, op0), - GEN_INT (elt / 2))); + GEN_INT (field))); emit_move_insn (target, gen_lowpart (V16QImode, x)); return true; } @@ -28478,9 +28479,10 @@ altivec_expand_vec_perm_const (rtx operands[4]) break; if (i == 16) { + int field = BYTES_BIG_ENDIAN ? elt / 4 : 3 - elt / 4; x = gen_reg_rtx (V4SImode); emit_insn (gen_altivec_vspltw (x, gen_lowpart (V4SImode, op0), - GEN_INT (elt / 4))); + GEN_INT (field))); emit_move_insn (target, gen_lowpart (V16QImode, x)); return true; } |