Commit 71dcd609 by Richard Guenther Committed by Richard Biener

tree-ssa-alias.c (nonaliasing_component_refs_p): Remove short-cutting on the first component.

2009-05-29  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (nonaliasing_component_refs_p): Remove
	short-cutting on the first component.

From-SVN: r147976
parent a900ae6b
2009-05-29 Richard Guenther <rguenther@suse.de>
* tree-ssa-alias.c (nonaliasing_component_refs_p): Remove
short-cutting on the first component.
2009-05-29 Jakub Jelinek <jakub@redhat.com>
PR middle-end/39958
......
......@@ -539,8 +539,7 @@ nonaliasing_component_refs_p (tree ref1, tree type1,
/* Now search for the type1 in the access path of ref2. This
would be a common base for doing offset based disambiguation on. */
/* Skip the outermost ref - we would have caught that earlier. */
refp = &TREE_OPERAND (ref2, 0);
refp = &ref2;
while (handled_component_p (*refp)
&& same_type_for_tbaa (TREE_TYPE (*refp), type1) == 0)
refp = &TREE_OPERAND (*refp, 0);
......@@ -556,7 +555,7 @@ nonaliasing_component_refs_p (tree ref1, tree type1,
return ranges_overlap_p (offset1, max_size1, offset2, max_size2);
}
/* If we didn't find a common base, try the other way around. */
refp = &TREE_OPERAND (ref1, 0);
refp = &ref1;
while (handled_component_p (*refp)
&& same_type_for_tbaa (TREE_TYPE (*refp), type2) == 0)
refp = &TREE_OPERAND (*refp, 0);
......
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