diff options
author | wschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-31 12:25:04 +0000 |
---|---|---|
committer | wschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-31 12:25:04 +0000 |
commit | ba69439f11358421e81653d967731550671a7289 (patch) | |
tree | b5228437c04a0ba87c454b39c628730188352ba0 /gcc/tree-vectorizer.h | |
parent | 86c98a43b4af8d90165cded55c0565a849e22050 (diff) | |
download | gcc-ba69439f11358421e81653d967731550671a7289.tar.gz |
gcc:
2012-07-31 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/53773
* tree-vectorizer.h (struct _loop_vec_info): Add operands_swapped.
(LOOP_VINFO_OPERANDS_SWAPPED): New macro.
* tree-vect-loop.c (new_loop_vec_info): Initialize
LOOP_VINFO_OPERANDS_SWAPPED field.
(destroy_loop_vec_info): Restore canonical form.
(vect_is_slp_reduction): Set LOOP_VINFO_OPERANDS_SWAPPED field.
(vect_is_simple_reduction_1): Likewise.
gcc/testsuite:
2012-07-31 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/53773
* testsuite/gcc.dg/vect/pr53773.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190007 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 96cc52e3df9..76418386e1a 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -296,6 +296,12 @@ typedef struct _loop_vec_info { this. */ bool peeling_for_gaps; + /* Reductions are canonicalized so that the last operand is the reduction + operand. If this places a constant into RHS1, this decanonicalizes + GIMPLE for other phases, so we must track when this has occurred and + fix it up. */ + bool operands_swapped; + } *loop_vec_info; /* Access Functions. */ @@ -326,6 +332,7 @@ typedef struct _loop_vec_info { #define LOOP_VINFO_PEELING_HTAB(L) (L)->peeling_htab #define LOOP_VINFO_TARGET_COST_DATA(L) (L)->target_cost_data #define LOOP_VINFO_PEELING_FOR_GAPS(L) (L)->peeling_for_gaps +#define LOOP_VINFO_OPERANDS_SWAPPED(L) (L)->operands_swapped #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \ VEC_length (gimple, (L)->may_misalign_stmts) > 0 |