Commit 493f4c9e by Bill Schmidt Committed by William Schmidt

vector.md (vec_realign_load_<mode>): Reorder input operands to vperm for little endian.

2013-07-24  Bill Schmidt  <wschmidt@vnet.linux.ibm.com>
	    Anton Blanchard <anton@au1.ibm.com>

	* vector.md (vec_realign_load_<mode>): Reorder input operands to
	vperm for little endian.
	* rs6000.c (rs6000_expand_builtin): Use lvsr instead of lvsl to
	create the control mask for a vperm for little endian.


Co-Authored-By: Anton Blanchard <anton@au1.ibm.com>

From-SVN: r201208
parent 017e07a1
2013-07-24 Bill Schmidt <wschmidt@vnet.linux.ibm.com>
Anton Blanchard <anton@au1.ibm.com>
* vector.md (vec_realign_load_<mode>): Reorder input operands to
vperm for little endian.
* rs6000.c (rs6000_expand_builtin): Use lvsr instead of lvsl to
create the control mask for a vperm for little endian.
2013-07-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Anton Blanchard <anton@au1.ibm.com>
......
......@@ -12351,7 +12351,8 @@ rs6000_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
case ALTIVEC_BUILTIN_MASK_FOR_STORE:
{
int icode = (int) CODE_FOR_altivec_lvsr;
int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
: (int) CODE_FOR_altivec_lvsl);
enum machine_mode tmode = insn_data[icode].operand[0].mode;
enum machine_mode mode = insn_data[icode].operand[1].mode;
tree arg;
......
......@@ -936,8 +936,12 @@
(match_operand:V16QI 3 "vlogical_operand" "")]
"VECTOR_MEM_ALTIVEC_OR_VSX_P (<MODE>mode)"
{
emit_insn (gen_altivec_vperm_<mode> (operands[0], operands[1], operands[2],
operands[3]));
if (BYTES_BIG_ENDIAN)
emit_insn (gen_altivec_vperm_<mode> (operands[0], operands[1],
operands[2], operands[3]));
else
emit_insn (gen_altivec_vperm_<mode> (operands[0], operands[2],
operands[1], operands[3]));
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