Commit a2780ddb by Andreas Krebbel Committed by Andreas Krebbel

optabs: Fix vec_perm -> V16QI middle end lowering.

The current implementation re-uses the location of the selection
pattern to generate a new one.  This fails if the pattern resides in a
read-only location.

gcc/
	* optabs.c (expand_vec_perm): Don't re-use SEL as target operand.

From-SVN: r223369
parent 05702110
2015-05-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* optabs.c (expand_vec_perm): Don't re-use SEL as target operand.
2015-05-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_secondary_reload): Fix check for
load/store relative.
......
......@@ -6777,11 +6777,11 @@ expand_vec_perm (machine_mode mode, rtx v0, rtx v1, rtx sel, rtx target)
machine_mode selmode = GET_MODE (sel);
if (u == 2)
sel = expand_simple_binop (selmode, PLUS, sel, sel,
sel, 0, OPTAB_DIRECT);
NULL, 0, OPTAB_DIRECT);
else
sel = expand_simple_binop (selmode, ASHIFT, sel,
GEN_INT (exact_log2 (u)),
sel, 0, OPTAB_DIRECT);
NULL, 0, OPTAB_DIRECT);
gcc_assert (sel != NULL);
/* Broadcast the low byte each element into each of its bytes. */
......
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