public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1808] Fixup reduction info on addsub SLP pattern
@ 2021-06-25 8:19 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-06-25 8:19 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:05516402f8eb8ec282a13fa1e38d9f9c5b3dd3e5
commit r12-1808-g05516402f8eb8ec282a13fa1e38d9f9c5b3dd3e5
Author: Richard Biener <rguenther@suse.de>
Date: Fri Jun 25 08:54:14 2021 +0200
Fixup reduction info on addsub SLP pattern
gcc.dg/vect/pr96854.c shows we need to copy over reduction info
to the SLP pattern as already done for the complex patterns.
2021-06-25 Richard Biener <rguenther@suse.de>
* tree-vect-slp-patterns.c (addsub_pattern::build): Copy
STMT_VINFO_REDUC_DEF from the original representative.
Diff:
---
gcc/tree-vect-slp-patterns.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/gcc/tree-vect-slp-patterns.c b/gcc/tree-vect-slp-patterns.c
index d536494a1bd..2671f91972d 100644
--- a/gcc/tree-vect-slp-patterns.c
+++ b/gcc/tree-vect-slp-patterns.c
@@ -1577,11 +1577,13 @@ addsub_pattern::build (vec_info *vinfo)
(TREE_TYPE (gimple_assign_lhs (rep->stmt))));
gimple_call_set_nothrow (call, true);
gimple_set_bb (call, gimple_bb (rep->stmt));
- SLP_TREE_REPRESENTATIVE (node) = vinfo->add_pattern_stmt (call, rep);
- STMT_VINFO_RELEVANT (SLP_TREE_REPRESENTATIVE (node)) = vect_used_in_scope;
- STMT_SLP_TYPE (SLP_TREE_REPRESENTATIVE (node)) = pure_slp;
- STMT_VINFO_VECTYPE (SLP_TREE_REPRESENTATIVE (node)) = SLP_TREE_VECTYPE (node);
- STMT_VINFO_SLP_VECT_ONLY_PATTERN (SLP_TREE_REPRESENTATIVE (node)) = true;
+ stmt_vec_info new_rep = vinfo->add_pattern_stmt (call, rep);
+ SLP_TREE_REPRESENTATIVE (node) = new_rep;
+ STMT_VINFO_RELEVANT (new_rep) = vect_used_in_scope;
+ STMT_SLP_TYPE (new_rep) = pure_slp;
+ STMT_VINFO_VECTYPE (new_rep) = SLP_TREE_VECTYPE (node);
+ STMT_VINFO_SLP_VECT_ONLY_PATTERN (new_rep) = true;
+ STMT_VINFO_REDUC_DEF (new_rep) = STMT_VINFO_REDUC_DEF (vect_orig_stmt (rep));
SLP_TREE_CODE (node) = ERROR_MARK;
SLP_TREE_LANE_PERMUTATION (node).release ();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-25 8:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 8:19 [gcc r12-1808] Fixup reduction info on addsub SLP pattern Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).