From: Jakub Jelinek Date: Wed, 1 Oct 2014 20:40:29 +0000 (+0200) Subject: re PR target/63428 (vshuf-v4di.c miscompilation) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7605d4dcdade606a9dd61801d700b92ac84ee05a;p=gcc.git re PR target/63428 (vshuf-v4di.c miscompilation) PR target/63428 * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0] argument to avx2_permv2ti. * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS to test 24 in TESTS. From-SVN: r215776 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 89c8efc31be..04637b05527 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-10-01 Jakub Jelinek + + PR target/63428 + * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0] + argument to avx2_permv2ti. + 2014-10-01 Kyrylo Tkachov * config/arm/arm.md (*store_minmaxsi): Disable for arm_restrict_it. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 4cf4dea7b07..84484bb2512 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -42961,8 +42961,8 @@ expand_vec_perm_pshufb (struct expand_vec_perm_d *d) op0 = gen_lowpart (V4DImode, d->op0); op1 = gen_lowpart (V4DImode, d->op1); rperm[0] - = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0) - || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0)); + = GEN_INT ((d->perm[0] / (nelt / 2)) + | ((d->perm[nelt / 2] / (nelt / 2)) * 16)); emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0])); if (target != d->target) emit_move_insn (d->target, gen_lowpart (d->vmode, target)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 628f9765eb0..213d2763e27 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,12 @@ +2014-10-01 Jakub Jelinek + + PR target/63428 + * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS + to test 24 in TESTS. + 2014-10-01 Bernhard Reutner-Fischer - * lib/target-supports.exp: error out with preprocessor condition + * lib/target-supports.exp: Error out with preprocessor condition instead of FOO everywhere. 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net> diff --git a/gcc/testsuite/gcc.dg/torture/vshuf-4.inc b/gcc/testsuite/gcc.dg/torture/vshuf-4.inc index c50fa8e9dd5..d0cb7387ca3 100644 --- a/gcc/testsuite/gcc.dg/torture/vshuf-4.inc +++ b/gcc/testsuite/gcc.dg/torture/vshuf-4.inc @@ -23,7 +23,8 @@ T (19, 3, 2, 1, 0) \ T (20, 0, 4, 1, 5) \ T (21, 2, 6, 3, 7) \ T (22, 1, 2, 3, 0) \ -T (23, 2, 1, 0, 3) +T (23, 2, 1, 0, 3) \ +T (24, 2, 5, 6, 3) #define EXPTESTS \ T (116, 1, 2, 4, 3) \ T (117, 7, 3, 3, 0) \ @@ -31,7 +32,6 @@ T (118, 5, 3, 2, 7) \ T (119, 0, 3, 5, 6) \ T (120, 0, 0, 1, 5) \ T (121, 4, 6, 2, 1) \ -T (122, 2, 5, 6, 3) \ T (123, 4, 6, 3, 2) \ T (124, 4, 7, 5, 6) \ T (125, 0, 4, 2, 4) \