diff options
author | Richard Biener <rguenther@suse.de> | 2015-05-12 11:55:40 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-05-12 11:55:40 +0000 |
commit | 6876e5bcd4e69cec6ef3507bb4ca64e22373b379 (patch) | |
tree | 48f20620956e1e4536e3d46f35bc962b7f2c4802 /gcc/tree-vectorizer.h | |
parent | eed4068d5d3916f9560246873069bfaaf7b75afe (diff) | |
download | gcc-6876e5bcd4e69cec6ef3507bb4ca64e22373b379.zip gcc-6876e5bcd4e69cec6ef3507bb4ca64e22373b379.tar.gz gcc-6876e5bcd4e69cec6ef3507bb4ca64e22373b379.tar.bz2 |
re PR tree-optimization/37021 (Fortran Complex reduction / multiplication not vectorized)
2015-05-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/37021
* tree-vectorizer.h (struct _slp_tree): Add two_operators flag.
(SLP_TREE_TWO_OPERATORS): New define.
* tree-vect-slp.c (vect_create_new_slp_node): Initialize
SLP_TREE_TWO_OPERATORS.
(vect_build_slp_tree_1): Allow two mixing plus/minus in an
SLP node.
(vect_build_slp_tree): Adjust.
(vect_analyze_slp_cost_1): Likewise.
(vect_schedule_slp_instance): Vectorize mixing plus/minus by
emitting two vector stmts and mixing the results.
* gcc.target/i386/vect-addsub.c: New testcase.
From-SVN: r223059
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 0796cc1..5a4fdbb 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -111,6 +111,8 @@ struct _slp_tree { scalar elements in one scalar iteration (GROUP_SIZE) multiplied by VF divided by vector size. */ unsigned int vec_stmts_size; + /* Whether the scalar computations use two different operators. */ + bool two_operators; }; @@ -146,6 +148,7 @@ typedef struct _slp_instance { #define SLP_TREE_VEC_STMTS(S) (S)->vec_stmts #define SLP_TREE_NUMBER_OF_VEC_STMTS(S) (S)->vec_stmts_size #define SLP_TREE_LOAD_PERMUTATION(S) (S)->load_permutation +#define SLP_TREE_TWO_OPERATORS(S) (S)->two_operators /* This structure is used in creation of an SLP tree. Each instance corresponds to the same operand in a group of scalar stmts in an SLP |