aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-slp.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-07-12 14:36:50 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-07-12 14:36:50 +0000
commitcf91b5997dec281e4b784c163d76d5be3e8569f6 (patch)
treebe91e099751f1fd3d9053da3a320b2d942abc9fa /gcc/tree-vect-slp.c
parentb847405adee3059762816ab009bc4a5281b5b911 (diff)
downloadgcc-cf91b5997dec281e4b784c163d76d5be3e8569f6.zip
gcc-cf91b5997dec281e4b784c163d76d5be3e8569f6.tar.gz
gcc-cf91b5997dec281e4b784c163d76d5be3e8569f6.tar.bz2
re PR tree-optimization/91145 (ICE: in vect_build_slp_tree_2, at tree-vect-slp.c:1143 with -march=skylake-avx512 -O3)
2019-07-12 Richard Biener <rguenther@suse.de> PR tree-optimization/91145 * tree-vect-slp.c (vect_build_slp_tree_2): Fix reduction chain check. * gcc.dg/torture/pr91145.c: New testcase. From-SVN: r273445
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r--gcc/tree-vect-slp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index d172c3a..31f4519 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1140,7 +1140,8 @@ vect_build_slp_tree_2 (vec_info *vinfo,
FOR_EACH_VEC_ELT (stmts, i, other_info)
{
/* But for reduction chains only check on the first stmt. */
- if (REDUC_GROUP_FIRST_ELEMENT (other_info)
+ if (!STMT_VINFO_DATA_REF (other_info)
+ && REDUC_GROUP_FIRST_ELEMENT (other_info)
&& REDUC_GROUP_FIRST_ELEMENT (other_info) != stmt_info)
continue;
if (STMT_VINFO_DEF_TYPE (other_info) != def_type)