mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-25 23:41:28 +08:00
re PR target/70421 (wrong code with v16si vector and useless cast at -O -mavx512f)
PR target/70421 * config/i386/i386.c (ix86_expand_vector_set): Fix up argument order in gen_blendm expander. * gcc.dg/torture/pr70421.c: New test. * gcc.target/i386/avx512f-pr70421.c: New test. From-SVN: r234569
This commit is contained in:
parent
1f73ef6c45
commit
d43242b9b9
@ -1,3 +1,9 @@
|
||||
2016-03-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/70421
|
||||
* config/i386/i386.c (ix86_expand_vector_set): Fix up argument order
|
||||
in gen_blendm expander.
|
||||
|
||||
2016-03-30 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR target/62254
|
||||
@ -5,7 +11,7 @@
|
||||
case where we are already provided with an SImode SUBREG.
|
||||
|
||||
2016-03-30 Michael Matz <matz@suse.de>
|
||||
Richard Biener <rguenther@suse.de>
|
||||
Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR ipa/12392
|
||||
* ipa-polymorphic-call.c (struct type_change_info): Change
|
||||
|
@ -46932,7 +46932,12 @@ half:
|
||||
{
|
||||
tmp = gen_reg_rtx (mode);
|
||||
emit_insn (gen_rtx_SET (tmp, gen_rtx_VEC_DUPLICATE (mode, val)));
|
||||
emit_insn (gen_blendm (target, tmp, target,
|
||||
/* The avx512*_blendm<mode> expanders have different operand order
|
||||
from VEC_MERGE. In VEC_MERGE, the first input operand is used for
|
||||
elements where the mask is set and second input operand otherwise,
|
||||
in {sse,avx}*_*blend* the first input operand is used for elements
|
||||
where the mask is clear and second input operand otherwise. */
|
||||
emit_insn (gen_blendm (target, target, tmp,
|
||||
force_reg (mmode,
|
||||
gen_int_mode (1 << elt, mmode))));
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
2016-03-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/70421
|
||||
* gcc.dg/torture/pr70421.c: New test.
|
||||
* gcc.target/i386/avx512f-pr70421.c: New test.
|
||||
|
||||
2016-03-30 Patrick Palka <ppalka@gcc.gnu.org>
|
||||
|
||||
PR tree-optimization/59124
|
||||
|
22
gcc/testsuite/gcc.dg/torture/pr70421.c
Normal file
22
gcc/testsuite/gcc.dg/torture/pr70421.c
Normal file
@ -0,0 +1,22 @@
|
||||
/* PR target/70421 */
|
||||
/* { dg-do run } */
|
||||
/* { dg-additional-options "-Wno-psabi -w" } */
|
||||
|
||||
typedef unsigned V __attribute__ ((vector_size (64)));
|
||||
|
||||
unsigned __attribute__ ((noinline, noclone))
|
||||
foo (unsigned x, V u, V v)
|
||||
{
|
||||
v[1] ^= v[2];
|
||||
x ^= ((V) v)[u[0]];
|
||||
return x;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
unsigned x = foo (0x10, (V) { 1 }, (V) { 0x100, 0x1000, 0x10000 });
|
||||
if (x != 0x11010)
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
15
gcc/testsuite/gcc.target/i386/avx512f-pr70421.c
Normal file
15
gcc/testsuite/gcc.target/i386/avx512f-pr70421.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* PR target/70421 */
|
||||
/* { dg-do run } */
|
||||
/* { dg-require-effective-target avx512f } */
|
||||
/* { dg-options "-O2 -mavx512f" } */
|
||||
|
||||
#include "avx512f-check.h"
|
||||
|
||||
#define main() do_main()
|
||||
#include "../../gcc.dg/torture/pr70421.c"
|
||||
|
||||
static void
|
||||
avx512f_test (void)
|
||||
{
|
||||
do_main ();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user