Commit 31330e16 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/50522 (C++ std::valarray vectorization missed optimization)

	PR tree-optimization/50522
	* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Don't test
	TYPE_RESTRICT.
	(ptr_derefs_may_alias_p): Call pt_solutions_same_restrict_base
	unconditionally.

From-SVN: r179502
parent f548a317
2011-10-04 Jakub Jelinek <jakub@redhat.com> 2011-10-04 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/50522
* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Don't test
TYPE_RESTRICT.
(ptr_derefs_may_alias_p): Call pt_solutions_same_restrict_base
unconditionally.
* fold-const.c (fold_unary_loc): Don't optimize * fold-const.c (fold_unary_loc): Don't optimize
POINTER_PLUS_EXPR casted to TYPE_RESTRICT pointer by POINTER_PLUS_EXPR casted to TYPE_RESTRICT pointer by
casting the inner pointer if it isn't TYPE_RESTRICT. casting the inner pointer if it isn't TYPE_RESTRICT.
...@@ -223,7 +223,6 @@ ptr_deref_may_alias_decl_p (tree ptr, tree decl) ...@@ -223,7 +223,6 @@ ptr_deref_may_alias_decl_p (tree ptr, tree decl)
pointer and that pointers points-to set doesn't contain this decl pointer and that pointers points-to set doesn't contain this decl
then they can't alias. */ then they can't alias. */
if (DECL_RESTRICTED_P (decl) if (DECL_RESTRICTED_P (decl)
&& TYPE_RESTRICT (TREE_TYPE (ptr))
&& pi->pt.vars_contains_restrict) && pi->pt.vars_contains_restrict)
return bitmap_bit_p (pi->pt.vars, DECL_PT_UID (decl)); return bitmap_bit_p (pi->pt.vars, DECL_PT_UID (decl));
...@@ -319,9 +318,7 @@ ptr_derefs_may_alias_p (tree ptr1, tree ptr2) ...@@ -319,9 +318,7 @@ ptr_derefs_may_alias_p (tree ptr1, tree ptr2)
/* If both pointers are restrict-qualified try to disambiguate /* If both pointers are restrict-qualified try to disambiguate
with restrict information. */ with restrict information. */
if (TYPE_RESTRICT (TREE_TYPE (ptr1)) if (!pt_solutions_same_restrict_base (&pi1->pt, &pi2->pt))
&& TYPE_RESTRICT (TREE_TYPE (ptr2))
&& !pt_solutions_same_restrict_base (&pi1->pt, &pi2->pt))
return false; return false;
/* ??? This does not use TBAA to prune decls from the intersection /* ??? This does not use TBAA to prune decls from the intersection
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment