diff options
author | Richard Biener <rguenther@suse.de> | 2019-12-02 10:50:45 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-12-02 10:50:45 +0000 |
commit | 2679730bab0202e7591adc6ac0ea1347b8954983 (patch) | |
tree | c3aad6aba27d6cf0aab6744a87c069ec79ce806b /gcc/tree-vect-loop.c | |
parent | a213ab38560f0b95ec318b2a4795e66cc0518848 (diff) | |
download | gcc-2679730bab0202e7591adc6ac0ea1347b8954983.zip gcc-2679730bab0202e7591adc6ac0ea1347b8954983.tar.gz gcc-2679730bab0202e7591adc6ac0ea1347b8954983.tar.bz2 |
re PR tree-optimization/92742 (ICE in info_for_reduction, at tree-vect-loop.c:4367)
2019-12-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/92742
* tree-vect-loop.c (vect_fixup_reduc_chain): Do not
touch the def-type but verify it is consistent with the
original stmts.
* gcc.dg/torture/pr92742.c: New testcase.
From-SVN: r278896
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 77c5a98..83b0e0b 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -643,6 +643,8 @@ vect_fixup_reduc_chain (stmt_vec_info stmt_info) do { stmtp = STMT_VINFO_RELATED_STMT (stmt_info); + gcc_checking_assert (STMT_VINFO_DEF_TYPE (stmtp) + == STMT_VINFO_DEF_TYPE (stmt_info)); REDUC_GROUP_FIRST_ELEMENT (stmtp) = firstp; stmt_info = REDUC_GROUP_NEXT_ELEMENT (stmt_info); if (stmt_info) @@ -650,7 +652,6 @@ vect_fixup_reduc_chain (stmt_vec_info stmt_info) = STMT_VINFO_RELATED_STMT (stmt_info); } while (stmt_info); - STMT_VINFO_DEF_TYPE (stmtp) = vect_reduction_def; } /* Fixup scalar cycles that now have their stmts detected as patterns. */ |