aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-06-30 13:27:43 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-06-30 13:27:43 +0000
commit42373e0b05c26d047925387d71fa833540dad8f0 (patch)
treece6a6cf934c4c1c58eb2379172f89d804384e2fa /gcc/tree-data-ref.c
parent7aa62ea1f86d6126485a01b7e91efe85544cc877 (diff)
downloadgcc-42373e0b05c26d047925387d71fa833540dad8f0.zip
gcc-42373e0b05c26d047925387d71fa833540dad8f0.tar.gz
gcc-42373e0b05c26d047925387d71fa833540dad8f0.tar.bz2
re PR tree-optimization/46787 (Does not vectorize loop with load from scalar variable)
2011-06-30 Richard Guenther <rguenther@suse.de> PR tree-optimization/46787 * tree-data-ref.c (dr_address_invariant_p): Remove. (find_data_references_in_stmt): Invariant accesses are ok now. * tree-vect-stmts.c (vectorizable_load): Handle invariant loads. * tree-vect-data-refs.c (vect_analyze_data_ref_access): Allow invariant loads. * gcc.dg/vect/vect-121.c: New testcase. From-SVN: r175704
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index ebabf61..d58542c 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -919,21 +919,6 @@ dr_analyze_alias (struct data_reference *dr)
}
}
-/* Returns true if the address of DR is invariant. */
-
-static bool
-dr_address_invariant_p (struct data_reference *dr)
-{
- unsigned i;
- tree idx;
-
- FOR_EACH_VEC_ELT (tree, DR_ACCESS_FNS (dr), i, idx)
- if (tree_contains_chrecs (idx, NULL))
- return false;
-
- return true;
-}
-
/* Frees data reference DR. */
void
@@ -4228,19 +4213,6 @@ find_data_references_in_stmt (struct loop *nest, gimple stmt,
dr = create_data_ref (nest, loop_containing_stmt (stmt),
*ref->pos, stmt, ref->is_read);
gcc_assert (dr != NULL);
-
- /* FIXME -- data dependence analysis does not work correctly for objects
- with invariant addresses in loop nests. Let us fail here until the
- problem is fixed. */
- if (dr_address_invariant_p (dr) && nest)
- {
- free_data_ref (dr);
- if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, "\tFAILED as dr address is invariant\n");
- ret = false;
- break;
- }
-
VEC_safe_push (data_reference_p, heap, *datarefs, dr);
}
VEC_free (data_ref_loc, heap, references);