altivec.md (p8_vmrgew): Handle little endian targets.
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Mon, 17 Feb 2014 02:01:42 +0000 (02:01 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Mon, 17 Feb 2014 02:01:42 +0000 (02:01 +0000)
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

gcc/ChangeLog
gcc/config/rs6000/altivec.md

index 1a3acf0..a448f37 100644 (file)
@@ -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.
 
index af6766b..afe621c 100644 (file)
          (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"
          (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"