Commit 2b9d0476 by Bill Schmidt Committed by William Schmidt

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
parent 1a5d2261
2013-11-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 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 * config/rs6000/altivec.md (vec_widen_umult_even_v16qi): Change
define_insn to define_expand that uses even patterns for big define_insn to define_expand that uses even patterns for big
endian and odd patterns for little endian. endian and odd patterns for little endian.
...@@ -651,7 +651,7 @@ ...@@ -651,7 +651,7 @@
convert_move (small_swap, swap, 0); convert_move (small_swap, swap, 0);
low_product = gen_reg_rtx (V4SImode); 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); high_product = gen_reg_rtx (V4SImode);
emit_insn (gen_altivec_vmsumuhm (high_product, one, small_swap, zero)); emit_insn (gen_altivec_vmsumuhm (high_product, one, small_swap, zero));
...@@ -678,13 +678,18 @@ ...@@ -678,13 +678,18 @@
emit_insn (gen_vec_widen_smult_even_v8hi (even, operands[1], operands[2])); 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_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) 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 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; DONE;
}") }")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment