Commit 54c4bfd7 by Bill Schmidt Committed by William Schmidt

vsx.md (vsx_xxpermdi_<mode>): Handle little endian targets.

2014-02-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Handle little
	endian targets.

From-SVN: r207814
parent 12dbb687
2014-02-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Handle little
endian targets.
2014-02-15 Michael Meissner <meissner@linux.vnet.ibm.com> 2014-02-15 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/60203 PR target/60203
......
...@@ -1621,7 +1621,18 @@ ...@@ -1621,7 +1621,18 @@
op1 = gen_lowpart (V2DImode, op1); op1 = gen_lowpart (V2DImode, op1);
} }
} }
emit_insn (gen (target, op0, op1, perm0, perm1)); /* In little endian mode, vsx_xxpermdi2_<mode>_1 will perform a
transformation we don't want; it is necessary for
rs6000_expand_vec_perm_const_1 but not for this use. So we
prepare for that by reversing the transformation here. */
if (BYTES_BIG_ENDIAN)
emit_insn (gen (target, op0, op1, perm0, perm1));
else
{
rtx p0 = GEN_INT (3 - INTVAL (perm1));
rtx p1 = GEN_INT (3 - INTVAL (perm0));
emit_insn (gen (target, op1, op0, p0, p1));
}
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