diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2014-02-17 02:01:42 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2014-02-17 02:01:42 +0000 |
commit | d737743fce8e8763c3b846393c92221371cd9f02 (patch) | |
tree | 447388c632b8d114717199a4cc16e57fe79cc3db /gcc | |
parent | 54c4bfd767a22d20d9b6bb0e8678e5c8650ecd67 (diff) | |
download | gcc-d737743fce8e8763c3b846393c92221371cd9f02.zip gcc-d737743fce8e8763c3b846393c92221371cd9f02.tar.gz gcc-d737743fce8e8763c3b846393c92221371cd9f02.tar.bz2 |
altivec.md (p8_vmrgew): Handle little endian targets.
2014-02-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/altivec.md (p8_vmrgew): Handle little endian
targets.
(p8_vmrgow): Likewise.
From-SVN: r207815
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/altivec.md | 14 |
2 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a3acf0..a448f37 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2014-02-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + * config/rs6000/altivec.md (p8_vmrgew): Handle little endian + targets. + (p8_vmrgow): Likewise. + +2014-02-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Handle little endian targets. diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md index af6766b..afe621c 100644 --- a/gcc/config/rs6000/altivec.md +++ b/gcc/config/rs6000/altivec.md @@ -1234,7 +1234,12 @@ (parallel [(const_int 0) (const_int 4) (const_int 2) (const_int 6)])))] "TARGET_P8_VECTOR" - "vmrgew %0,%1,%2" +{ + if (BYTES_BIG_ENDIAN) + return "vmrgew %0,%1,%2"; + else + return "vmrgow %0,%2,%1"; +} [(set_attr "type" "vecperm")]) (define_insn "p8_vmrgow" @@ -1246,7 +1251,12 @@ (parallel [(const_int 1) (const_int 5) (const_int 3) (const_int 7)])))] "TARGET_P8_VECTOR" - "vmrgow %0,%1,%2" +{ + if (BYTES_BIG_ENDIAN) + return "vmrgow %0,%1,%2"; + else + return "vmrgew %0,%2,%1"; +} [(set_attr "type" "vecperm")]) (define_expand "vec_widen_umult_even_v16qi" |