diff options
author | irar <irar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-28 09:20:16 +0000 |
---|---|---|
committer | irar <irar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-28 09:20:16 +0000 |
commit | 0bc79e047db33e57e6fc7fd598ead2baa4086c04 (patch) | |
tree | 7470bc3e13a2cb27b41b0dc35ef98e38555e9b54 /gcc/tree-vect-slp.c | |
parent | 2d540dcba5748f4dff117eceaf3c89d4433060be (diff) | |
download | gcc-0bc79e047db33e57e6fc7fd598ead2baa4086c04.tar.gz |
PR tree-optimization/51684
* tree-vect-slp.c (vect_schedule_slp_instance): Get gsi of
original statement in case of a pattern.
(vect_schedule_slp): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182705 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 23330b2882f..91ed0c70634 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -2885,6 +2885,8 @@ vect_schedule_slp_instance (slp_tree node, slp_instance instance, && REFERENCE_CLASS_P (gimple_get_lhs (stmt))) { gimple last_store = vect_find_last_store_in_slp_instance (instance); + if (is_pattern_stmt_p (vinfo_for_stmt (last_store))) + last_store = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (last_store)); si = gsi_for_stmt (last_store); } @@ -2989,6 +2991,8 @@ vect_schedule_slp (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo) if (!STMT_VINFO_DATA_REF (vinfo_for_stmt (store))) break; + if (is_pattern_stmt_p (vinfo_for_stmt (store))) + store = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (store)); /* Free the attached stmt_vec_info and remove the stmt. */ gsi = gsi_for_stmt (store); gsi_remove (&gsi, true); |