From a2780ddb46556eac870f843df4dca394a48844bb Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Tue, 19 May 2015 14:51:47 +0000 Subject: 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 --- gcc/ChangeLog | 4 ++++ gcc/optabs.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ae08e6..e261bc0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2015-05-19 Andreas Krebbel + * optabs.c (expand_vec_perm): Don't re-use SEL as target operand. + +2015-05-19 Andreas Krebbel + * config/s390/s390.c (s390_secondary_reload): Fix check for load/store relative. diff --git a/gcc/optabs.c b/gcc/optabs.c index d883b00..5fa9eec 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -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. */ -- cgit v1.1