diff options
author | Richard Guenther <rguenther@suse.de> | 2012-03-23 11:34:32 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-03-23 11:34:32 +0000 |
commit | 0ac168a1cd87bfefee6f8ebad245080cfe16fc1d (patch) | |
tree | 8b6ebe34884569f079b8d732cd6e253f6ca11fac /gcc/tree-vectorizer.h | |
parent | 6e349de504c00b9451becd66103ae96eb4b6ad56 (diff) | |
download | gcc-0ac168a1cd87bfefee6f8ebad245080cfe16fc1d.zip gcc-0ac168a1cd87bfefee6f8ebad245080cfe16fc1d.tar.gz gcc-0ac168a1cd87bfefee6f8ebad245080cfe16fc1d.tar.bz2 |
re PR tree-optimization/52678 (internal compiler error: in vect_update_ivs_after_vectorizer, at tree-vect-loop-manip.c:1842)
2012-03-23 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52678
* tree-vectorizer.h (struct _stmt_vec_info): Add
loop_phi_evolution_part member.
(STMT_VINFO_LOOP_PHI_EVOLUTION_PART): New define.
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Initialize
STMT_VINFO_LOOP_PHI_EVOLUTION_PART.
* tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer):
Use the cached evolution part and the PHI nodes value from
the loop preheader edge instead of re-analyzing the evolution.
* gfortran.dg/pr52678.f: New testcase.
From-SVN: r185734
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 14eb201..5f031b5 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -476,6 +476,13 @@ typedef struct _stmt_vec_info { tree dr_step; tree dr_aligned_to; + /* For loop PHI nodes, the evolution part of it. This makes sure + this information is still available in vect_update_ivs_after_vectorizer + where we may not be able to re-analyze the PHI nodes evolution as + peeling for the prologue loop can make it unanalyzable. The evolution + part is still correct though. */ + tree loop_phi_evolution_part; + /* Used for various bookkeeping purposes, generally holding a pointer to some other stmt S that is in some way "related" to this stmt. Current use of this field is: @@ -572,6 +579,7 @@ typedef struct _stmt_vec_info { #define STMT_VINFO_GROUP_SAME_DR_STMT(S) (S)->same_dr_stmt #define STMT_VINFO_GROUP_READ_WRITE_DEPENDENCE(S) (S)->read_write_dep #define STMT_VINFO_STRIDED_ACCESS(S) ((S)->first_element != NULL && (S)->data_ref_info) +#define STMT_VINFO_LOOP_PHI_EVOLUTION_PART(S) (S)->loop_phi_evolution_part #define GROUP_FIRST_ELEMENT(S) (S)->first_element #define GROUP_NEXT_ELEMENT(S) (S)->next_element |