Commit a7e8a463 by Jan Hubicka Committed by Jan Hubicka

tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Check that base2_alias_set is…

tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Check that base2_alias_set is non-zero before doing TBAA based disambiguation.

	* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Check that
	base2_alias_set is non-zero before doing TBAA based disambiguation.

From-SVN: r272639
parent 1a3e38ae
2019-06-25 Jan Hubicka <jh@suse.cz>
* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Check that
base2_alias_set is non-zero before doing TBAA based disambiguation.
2019-06-25 Martin Liska <mliska@suse.cz> 2019-06-25 Martin Liska <mliska@suse.cz>
PR tree-optimization/90973 PR tree-optimization/90973
......
...@@ -1458,10 +1458,8 @@ indirect_ref_may_alias_decl_p (tree ref1 ATTRIBUTE_UNUSED, tree base1, ...@@ -1458,10 +1458,8 @@ indirect_ref_may_alias_decl_p (tree ref1 ATTRIBUTE_UNUSED, tree base1,
if (!flag_strict_aliasing || !tbaa_p) if (!flag_strict_aliasing || !tbaa_p)
return true; return true;
ptrtype1 = TREE_TYPE (TREE_OPERAND (base1, 1));
/* If the alias set for a pointer access is zero all bets are off. */ /* If the alias set for a pointer access is zero all bets are off. */
if (base1_alias_set == 0) if (base1_alias_set == 0 || base2_alias_set == 0)
return true; return true;
/* When we are trying to disambiguate an access with a pointer dereference /* When we are trying to disambiguate an access with a pointer dereference
...@@ -1479,6 +1477,9 @@ indirect_ref_may_alias_decl_p (tree ref1 ATTRIBUTE_UNUSED, tree base1, ...@@ -1479,6 +1477,9 @@ indirect_ref_may_alias_decl_p (tree ref1 ATTRIBUTE_UNUSED, tree base1,
if (base1_alias_set != base2_alias_set if (base1_alias_set != base2_alias_set
&& !alias_sets_conflict_p (base1_alias_set, base2_alias_set)) && !alias_sets_conflict_p (base1_alias_set, base2_alias_set))
return false; return false;
ptrtype1 = TREE_TYPE (TREE_OPERAND (base1, 1));
/* If the size of the access relevant for TBAA through the pointer /* If the size of the access relevant for TBAA through the pointer
is bigger than the size of the decl we can't possibly access the is bigger than the size of the decl we can't possibly access the
decl via that pointer. */ decl via that pointer. */
......
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