2013-07-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Anton Blanchard <anton@au1.ibm.com>
* config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Reverse
two operands for little-endian.
Co-Authored-By: Anton Blanchard <anton@au1.ibm.com>
From-SVN: r201195
+2013-07-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ Anton Blanchard <anton@au1.ibm.com>
+
+ * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Reverse
+ two operands for little-endian.
+
2013-07-23 Steve Ellcey <sellcey@mips.com>
* config/mips/mips.c (mips_case_values_threshold): New.
enum machine_mode omode = insn_data[icode].operand[0].mode;
enum machine_mode imode = insn_data[icode].operand[1].mode;
- if (swapped)
+ /* For little-endian, the two input operands must be swapped
+ (or swapped back) to ensure proper right-to-left numbering
+ from 0 to 2N-1. */
+ if (swapped ^ !BYTES_BIG_ENDIAN)
x = op0, op0 = op1, op1 = x;
if (imode != V16QImode)
{