diff options
author | Richard Biener <rguenther@suse.de> | 2017-05-11 14:08:07 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-05-11 14:08:07 +0000 |
commit | 43b883a99006138770d42067d385347fbae21334 (patch) | |
tree | 60aa0326b74bb6c26cb4ebb65d8f8152f48b53f1 /gcc/tree-vect-data-refs.c | |
parent | f8cba3aaaef329e00f8af4364765274205402be9 (diff) | |
download | gcc-43b883a99006138770d42067d385347fbae21334.zip gcc-43b883a99006138770d42067d385347fbae21334.tar.gz gcc-43b883a99006138770d42067d385347fbae21334.tar.bz2 |
re PR tree-optimization/80705 (Incorrect code generated for profile counter updates due to SLP+LIM)
2017-05-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/80705
* tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
bases are not vectorizable.
* gcc.dg/vect/bb-slp-pr80705.c: New testcase.
From-SVN: r247906
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index c974268..67cc969 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -3957,6 +3957,27 @@ again: datarefs[i] = dr; } + if (TREE_CODE (DR_BASE_ADDRESS (dr)) == ADDR_EXPR + && VAR_P (TREE_OPERAND (DR_BASE_ADDRESS (dr), 0)) + && DECL_NONALIASED (TREE_OPERAND (DR_BASE_ADDRESS (dr), 0))) + { + if (dump_enabled_p ()) + { + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "not vectorized: base object not addressable " + "for stmt: "); + dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0); + } + if (is_a <bb_vec_info> (vinfo)) + { + /* In BB vectorization the ref can still participate + in dependence analysis, we just can't vectorize it. */ + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + continue; + } + return false; + } + /* Set vectype for STMT. */ scalar_type = TREE_TYPE (DR_REF (dr)); STMT_VINFO_VECTYPE (stmt_info) |