diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-29 14:40:16 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-29 14:40:16 +0000 |
commit | 87c952b895ebe6126c0c908e52d15dac3230678e (patch) | |
tree | defff990b81b71950b63227548cb841b34adf3bd /gcc/tree-vect-data-refs.c | |
parent | 9d75589a06dc34107b8d994274b615bda4439c81 (diff) | |
download | gcc-87c952b895ebe6126c0c908e52d15dac3230678e.tar.gz |
2012-05-29 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53516
* tree-data-ref.c (stmt_with_adjacent_zero_store_dr_p): Reject
bitfield accesses.
* tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
* gcc.dg/torture/pr53516.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187961 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index a5ed0533db6..e34f41a3f1f 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2972,10 +2972,6 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, return false; } - base = unshare_expr (DR_BASE_ADDRESS (dr)); - offset = unshare_expr (DR_OFFSET (dr)); - init = unshare_expr (DR_INIT (dr)); - if (stmt_can_throw_internal (stmt)) { if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) @@ -2997,6 +2993,32 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, return false; } + if (TREE_CODE (DR_REF (dr)) == COMPONENT_REF + && DECL_BIT_FIELD (TREE_OPERAND (DR_REF (dr), 1))) + { + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) + { + fprintf (vect_dump, "not vectorized: statement is bitfield " + "access "); + print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); + } + + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + + if (gather) + free_data_ref (dr); + return false; + } + + base = unshare_expr (DR_BASE_ADDRESS (dr)); + offset = unshare_expr (DR_OFFSET (dr)); + init = unshare_expr (DR_INIT (dr)); + if (is_gimple_call (stmt)) { if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) |