diff options
author | Tamar Christina <tamar.christina@arm.com> | 2021-02-03 08:06:11 +0000 |
---|---|---|
committer | Tamar Christina <tamar.christina@arm.com> | 2021-02-03 08:06:11 +0000 |
commit | 5e606ed90a1bed878071b6b5a3ef9b97b3d99838 (patch) | |
tree | 2a6db1e9b76837733e48a50349a76c1e4bd014d1 /gcc/tree-vectorizer.h | |
parent | 548b75d82229cf30052db3ad13e34115335cd9d8 (diff) | |
download | gcc-5e606ed90a1bed878071b6b5a3ef9b97b3d99838.zip gcc-5e606ed90a1bed878071b6b5a3ef9b97b3d99838.tar.gz gcc-5e606ed90a1bed878071b6b5a3ef9b97b3d99838.tar.bz2 |
slp: Split out patterns away from using SLP_ONLY into their own flag
Previously the SLP pattern matcher was using STMT_VINFO_SLP_VECT_ONLY as a way
to dissolve the SLP only patterns during SLP cancellation. However it seems
like the semantics for STMT_VINFO_SLP_VECT_ONLY are slightly different than what
I expected.
Namely that the non-SLP path can still use a statement marked
STMT_VINFO_SLP_VECT_ONLY. One such example is masked loads which are used both
in the SLP and non-SLP path.
To fix this I now introduce a new flag STMT_VINFO_SLP_VECT_ONLY_PATTERN which is
used only by the pattern matcher.
gcc/ChangeLog:
PR tree-optimization/98928
* tree-vect-loop.c (vect_analyze_loop_2): Change
STMT_VINFO_SLP_VECT_ONLY to STMT_VINFO_SLP_VECT_ONLY_PATTERN.
* tree-vect-slp-patterns.c (complex_pattern::build): Likewise.
* tree-vectorizer.h (STMT_VINFO_SLP_VECT_ONLY_PATTERN): New.
(class _stmt_vec_info): Add slp_vect_pattern_only_p.
gcc/testsuite/ChangeLog:
PR tree-optimization/98928
* gcc.target/i386/pr98928.c: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index f8bf448..e564fcf 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1215,6 +1215,10 @@ public: /* True if this is only suitable for SLP vectorization. */ bool slp_vect_only_p; + + /* True if this is a pattern that can only be handled by SLP + vectorization. */ + bool slp_vect_pattern_only_p; }; /* Information about a gather/scatter call. */ @@ -1301,6 +1305,7 @@ struct gather_scatter_info { #define STMT_VINFO_REDUC_VECTYPE(S) (S)->reduc_vectype #define STMT_VINFO_REDUC_VECTYPE_IN(S) (S)->reduc_vectype_in #define STMT_VINFO_SLP_VECT_ONLY(S) (S)->slp_vect_only_p +#define STMT_VINFO_SLP_VECT_ONLY_PATTERN(S) (S)->slp_vect_pattern_only_p #define DR_GROUP_FIRST_ELEMENT(S) \ (gcc_checking_assert ((S)->dr_aux.dr), (S)->first_element) |