]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
altivec.md (mulv4si3): Ensure we generate vmulouh for both big and little endian.
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Wed, 6 Nov 2013 03:29:44 +0000 (03:29 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Wed, 6 Nov 2013 03:29:44 +0000 (03:29 +0000)
2013-11-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/altivec.md (mulv4si3): Ensure we generate vmulouh
for both big and little endian.
(mulv8hi3): Swap input operands for merge high and merge low
instructions for little endian.

From-SVN: r204440

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

index c464dfcc9a7fa792f414c50cc380613c4f5261ed..f0da9fc74dcbfd9c92b7b3d70fbe69621611e10b 100644 (file)
@@ -1,3 +1,10 @@
+2013-11-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       * config/rs6000/altivec.md (mulv4si3): Ensure we generate vmulouh
+       for both big and little endian.
+       (mulv8hi3): Swap input operands for merge high and merge low
+       instructions for little endian.
+
 2013-11-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        * config/rs6000/altivec.md (vec_widen_umult_even_v16qi): Change
index 4c426cc2908eea44b79035634f9d618b64714e20..9f4b6a4b3928e10870d20727b3a7321643c69326 100644 (file)
    convert_move (small_swap, swap, 0);
  
    low_product = gen_reg_rtx (V4SImode);
-   emit_insn (gen_vec_widen_umult_odd_v8hi (low_product, one, two));
+   emit_insn (gen_altivec_vmulouh (low_product, one, two));
  
    high_product = gen_reg_rtx (V4SImode);
    emit_insn (gen_altivec_vmsumuhm (high_product, one, small_swap, zero));
    emit_insn (gen_vec_widen_smult_even_v8hi (even, operands[1], operands[2]));
    emit_insn (gen_vec_widen_smult_odd_v8hi (odd, operands[1], operands[2]));
 
-   emit_insn (gen_altivec_vmrghw (high, even, odd));
-   emit_insn (gen_altivec_vmrglw (low, even, odd));
-
    if (BYTES_BIG_ENDIAN)
-     emit_insn (gen_altivec_vpkuwum (operands[0], high, low));
+     {
+       emit_insn (gen_altivec_vmrghw (high, even, odd));
+       emit_insn (gen_altivec_vmrglw (low, even, odd));
+       emit_insn (gen_altivec_vpkuwum (operands[0], high, low));
+     }
    else
-     emit_insn (gen_altivec_vpkuwum (operands[0], low, high));
+     {
+       emit_insn (gen_altivec_vmrghw (high, odd, even));
+       emit_insn (gen_altivec_vmrglw (low, odd, even));
+       emit_insn (gen_altivec_vpkuwum (operands[0], low, high));
+     } 
 
    DONE;
 }")