tree-optimization/98191 - fix BIT_INSERT_EXPR sequence vectorization
This adds a missing check. 2020-12-08 Richard Biener <rguenther@suse.de> PR tree-optimization/98191 * tree-vect-slp.c (vect_slp_check_for_constructors): Do not follow a non-SSA def chain. * gcc.dg/torture/pr98191.c: New testcase.
This commit is contained in:
parent
a294e6368f
commit
c2c198bfd1
2 changed files with 12 additions and 1 deletions
10
gcc/testsuite/gcc.dg/torture/pr98191.c
Normal file
10
gcc/testsuite/gcc.dg/torture/pr98191.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
/* { dg-do compile } */
|
||||
|
||||
typedef double v2df __attribute__((vector_size(2*sizeof(double))));
|
||||
|
||||
v2df foo (double *y)
|
||||
{
|
||||
v2df x = (v2df){ 1.0, 2.0 };
|
||||
x[0] = *y;
|
||||
return x;
|
||||
}
|
|
@ -4243,7 +4243,8 @@ vect_slp_check_for_constructors (bb_vec_info bb_vinfo)
|
|||
def = gimple_assign_rhs1 (assign);
|
||||
do
|
||||
{
|
||||
if (!has_single_use (def))
|
||||
if (TREE_CODE (def) != SSA_NAME
|
||||
|| !has_single_use (def))
|
||||
break;
|
||||
gimple *def_stmt = SSA_NAME_DEF_STMT (def);
|
||||
unsigned this_lane;
|
||||
|
|
Loading…
Add table
Reference in a new issue