From: Jakub Jelinek Date: Wed, 1 Oct 2014 20:41:05 +0000 (+0200) Subject: i386.c (expand_vec_perm_vperm2f128): Canonicalize dfirst permutation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0aa789a7315d60c5b20b8caebd7717d4595f67cc;p=gcc.git i386.c (expand_vec_perm_vperm2f128): Canonicalize dfirst permutation. * config/i386/i386.c (expand_vec_perm_vperm2f128): Canonicalize dfirst permutation. From-SVN: r215777 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 04637b05527..54b6b0b2dc0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2014-10-01 Jakub Jelinek + * config/i386/i386.c (expand_vec_perm_vperm2f128): Canonicalize + dfirst permutation. + PR target/63428 * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0] argument to avx2_permv2ti. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 84484bb2512..b40852d3b6b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -43874,15 +43874,16 @@ expand_vec_perm_vperm2f128 (struct expand_vec_perm_d *d) dfirst.perm[i] = (i & (nelt2 - 1)) + ((perm >> (2 * (i >= nelt2))) & 3) * nelt2; + canonicalize_perm (&dfirst); ok = expand_vec_perm_1 (&dfirst); gcc_assert (ok); /* And dsecond is some single insn shuffle, taking d->op0 and result of vperm2f128 (if perm < 16) or d->op1 and result of vperm2f128 (otherwise). */ - dsecond.op1 = dfirst.target; if (perm >= 16) - dsecond.op0 = dfirst.op1; + dsecond.op0 = dsecond.op1; + dsecond.op1 = dfirst.target; ok = expand_vec_perm_1 (&dsecond); gcc_assert (ok);