2014-04-24 Tejas Belagod <tejas.belagod@arm.com>
* config/aarch64/aarch64.c (aarch64_evpc_tbl): Reverse order of elements
for big-endian.
From-SVN: r209742
+2014-04-24 Tejas Belagod <tejas.belagod@arm.com>
+
+ * config/aarch64/aarch64.c (aarch64_evpc_tbl): Reverse order of elements
+ for big-endian.
+
2014-04-24 Richard Biener <rguenther@suse.de>
* expr.c (expand_expr_real_1): Avoid gimple_assign_rhs_to_tree
return false;
for (i = 0; i < nelt; ++i)
- rperm[i] = GEN_INT (d->perm[i]);
+ {
+ int nunits = GET_MODE_NUNITS (vmode);
+
+ /* If big-endian and two vectors we end up with a weird mixed-endian
+ mode on NEON. Reverse the index within each word but not the word
+ itself. */
+ rperm[i] = GEN_INT (BYTES_BIG_ENDIAN ? d->perm[i] ^ (nunits - 1)
+ : d->perm[i]);
+ }
sel = gen_rtx_CONST_VECTOR (vmode, gen_rtvec_v (nelt, rperm));
sel = force_reg (vmode, sel);