aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2013-11-06 03:29:44 +0000
committerWilliam Schmidt <wschmidt@gcc.gnu.org>2013-11-06 03:29:44 +0000
commit2b9d047631ee625de6953470af92e37450b2cd66 (patch)
treed11585a0f5c4cd59c22cd63a6158fe64c41a81f6 /gcc
parent1a5d226128b32bd7b3a3f574cdd89e2c404fec81 (diff)
downloadgcc-2b9d047631ee625de6953470af92e37450b2cd66.zip
gcc-2b9d047631ee625de6953470af92e37450b2cd66.tar.gz
gcc-2b9d047631ee625de6953470af92e37450b2cd66.tar.bz2
altivec.md (mulv4si3): Ensure we generate vmulouh for both big and little endian.
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/rs6000/altivec.md17
2 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c464dfc..f0da9fc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
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
define_insn to define_expand that uses even patterns for big
endian and odd patterns for little endian.
diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index 4c426cc..9f4b6a4 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -651,7 +651,7 @@
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));
@@ -678,13 +678,18 @@
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;
}")