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
This commit is contained in:
Bill Schmidt 2014-02-17 02:00:26 +00:00 committed by William Schmidt
parent 12dbb687e9
commit 54c4bfd767
2 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,8 @@
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>
PR target/60203

View file

@ -1621,7 +1621,18 @@
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;
})