diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2014-02-17 02:00:26 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2014-02-17 02:00:26 +0000 |
commit | 54c4bfd767a22d20d9b6bb0e8678e5c8650ecd67 (patch) | |
tree | 0b712c29aabc00924942abd27d55a3c69b04f009 | |
parent | 12dbb687e90edc655c57c9b1581b60772fb4e261 (diff) | |
download | gcc-54c4bfd767a22d20d9b6bb0e8678e5c8650ecd67.zip gcc-54c4bfd767a22d20d9b6bb0e8678e5c8650ecd67.tar.gz gcc-54c4bfd767a22d20d9b6bb0e8678e5c8650ecd67.tar.bz2 |
vsx.md (vsx_xxpermdi_<mode>): Handle little endian targets.
2014-02-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Handle little
endian targets.
From-SVN: r207814
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/vsx.md | 13 |
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b857c11..1a3acf0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-02-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + + * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Handle little + endian targets. + 2014-02-15 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/60203 diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index d0fc8cb..d7450a4 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -1621,7 +1621,18 @@ op1 = gen_lowpart (V2DImode, op1); } } - emit_insn (gen (target, op0, op1, perm0, perm1)); + /* In little endian mode, vsx_xxpermdi2_<mode>_1 will perform a + transformation we don't want; it is necessary for + rs6000_expand_vec_perm_const_1 but not for this use. So we + prepare for that by reversing the transformation here. */ + if (BYTES_BIG_ENDIAN) + emit_insn (gen (target, op0, op1, perm0, perm1)); + else + { + rtx p0 = GEN_INT (3 - INTVAL (perm1)); + rtx p1 = GEN_INT (3 - INTVAL (perm0)); + emit_insn (gen (target, op1, op0, p0, p1)); + } DONE; }) |