re PR target/85169 (wrong code with vector member insert)
PR target/85169 * config/i386/i386.c (ix86_expand_vector_set): Use HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix. * gcc.c-torture/execute/pr85169.c: New test. * gcc.target/i386/avx512f-pr85169.c: New test. * gcc.target/i386/avx512bw-pr85169.c: New test. From-SVN: r259037
This commit is contained in:
parent
86d13a05fd
commit
4304d6180a
@ -1,3 +1,9 @@
|
|||||||
|
2018-04-03 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR target/85169
|
||||||
|
* config/i386/i386.c (ix86_expand_vector_set): Use
|
||||||
|
HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
|
||||||
|
|
||||||
2018-04-03 Uros Bizjak <ubizjak@gmail.com>
|
2018-04-03 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
* config/i386/i386.c (emit_i387_cw_initialization): Always use logic
|
* config/i386/i386.c (emit_i387_cw_initialization): Always use logic
|
||||||
|
@ -44127,12 +44127,14 @@ quarter:
|
|||||||
where the mask is clear and second input operand otherwise. */
|
where the mask is clear and second input operand otherwise. */
|
||||||
emit_insn (gen_blendm (target, target, tmp,
|
emit_insn (gen_blendm (target, target, tmp,
|
||||||
force_reg (mmode,
|
force_reg (mmode,
|
||||||
gen_int_mode (1 << elt, mmode))));
|
gen_int_mode (HOST_WIDE_INT_1U << elt,
|
||||||
|
mmode))));
|
||||||
}
|
}
|
||||||
else if (use_vec_merge)
|
else if (use_vec_merge)
|
||||||
{
|
{
|
||||||
tmp = gen_rtx_VEC_DUPLICATE (mode, val);
|
tmp = gen_rtx_VEC_DUPLICATE (mode, val);
|
||||||
tmp = gen_rtx_VEC_MERGE (mode, tmp, target, GEN_INT (1 << elt));
|
tmp = gen_rtx_VEC_MERGE (mode, tmp, target,
|
||||||
|
GEN_INT (HOST_WIDE_INT_1U << elt));
|
||||||
emit_insn (gen_rtx_SET (target, tmp));
|
emit_insn (gen_rtx_SET (target, tmp));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -44141,7 +44143,7 @@ quarter:
|
|||||||
|
|
||||||
emit_move_insn (mem, target);
|
emit_move_insn (mem, target);
|
||||||
|
|
||||||
tmp = adjust_address (mem, inner_mode, elt*GET_MODE_SIZE (inner_mode));
|
tmp = adjust_address (mem, inner_mode, elt * GET_MODE_SIZE (inner_mode));
|
||||||
emit_move_insn (tmp, val);
|
emit_move_insn (tmp, val);
|
||||||
|
|
||||||
emit_move_insn (target, mem);
|
emit_move_insn (target, mem);
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2018-04-03 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR target/85169
|
||||||
|
* gcc.c-torture/execute/pr85169.c: New test.
|
||||||
|
* gcc.target/i386/avx512f-pr85169.c: New test.
|
||||||
|
* gcc.target/i386/avx512bw-pr85169.c: New test.
|
||||||
|
|
||||||
2018-04-03 Segher Boessenkool <segher@kernel.crashing.org>
|
2018-04-03 Segher Boessenkool <segher@kernel.crashing.org>
|
||||||
|
|
||||||
PR target/85126
|
PR target/85126
|
||||||
|
22
gcc/testsuite/gcc.c-torture/execute/pr85169.c
Normal file
22
gcc/testsuite/gcc.c-torture/execute/pr85169.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/* PR target/85169 */
|
||||||
|
|
||||||
|
typedef char V __attribute__((vector_size (64)));
|
||||||
|
|
||||||
|
static void __attribute__ ((noipa))
|
||||||
|
foo (V *p)
|
||||||
|
{
|
||||||
|
V v = *p;
|
||||||
|
v[63] = 1;
|
||||||
|
*p = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
V v = (V) { };
|
||||||
|
foo (&v);
|
||||||
|
for (unsigned i = 0; i < 64; i++)
|
||||||
|
if (v[i] != (i == 63))
|
||||||
|
__builtin_abort ();
|
||||||
|
return 0;
|
||||||
|
}
|
18
gcc/testsuite/gcc.target/i386/avx512bw-pr85169.c
Normal file
18
gcc/testsuite/gcc.target/i386/avx512bw-pr85169.c
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/* PR target/85169 */
|
||||||
|
/* { dg-do run { target avx512bw } } */
|
||||||
|
/* { dg-options "-O2 -mavx512bw" } */
|
||||||
|
|
||||||
|
#include "avx512bw-check.h"
|
||||||
|
|
||||||
|
int do_main (void);
|
||||||
|
|
||||||
|
static void
|
||||||
|
avx512bw_test (void)
|
||||||
|
{
|
||||||
|
do_main ();
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef main
|
||||||
|
#define main() do_main ()
|
||||||
|
|
||||||
|
#include "../../gcc.c-torture/execute/pr85169.c"
|
18
gcc/testsuite/gcc.target/i386/avx512f-pr85169.c
Normal file
18
gcc/testsuite/gcc.target/i386/avx512f-pr85169.c
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/* PR target/85169 */
|
||||||
|
/* { dg-do run { target avx512f } } */
|
||||||
|
/* { dg-options "-O2 -mavx512f" } */
|
||||||
|
|
||||||
|
#include "avx512f-check.h"
|
||||||
|
|
||||||
|
int do_main (void);
|
||||||
|
|
||||||
|
static void
|
||||||
|
avx512f_test (void)
|
||||||
|
{
|
||||||
|
do_main ();
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef main
|
||||||
|
#define main() do_main ()
|
||||||
|
|
||||||
|
#include "../../gcc.c-torture/execute/pr85169.c"
|
Loading…
Reference in New Issue
Block a user