Commit 7c6dafac by Changpeng Fang Committed by Sebastian Pop

Fix PR 44955: Strip off the real and complex parts.

2010-07-21  Changpeng Fang  <changpeng.fang@amd.com>

	PR tree-optimization/44955
	* tree-ssa-loop-prefetch.c (analyze_ref): Strip off the real
	and imagine parts of a complex, so that they can have the same
	base and fall into the same group.

From-SVN: r162381
parent 60f6be5a
2010-07-21 Changpeng Fang <changpeng.fang@amd.com>
* tree-ssa-loop-prefetch.c (analyze_ref): Strip off the real
and imagine parts of a complex, so that they can have the same
base and fall into the same group.
2010-07-21 Richard Guenther <rguenther@suse.de> 2010-07-21 Richard Guenther <rguenther@suse.de>
PR lto/45018 PR lto/45018
......
...@@ -486,10 +486,18 @@ analyze_ref (struct loop *loop, tree *ref_p, tree *base, ...@@ -486,10 +486,18 @@ analyze_ref (struct loop *loop, tree *ref_p, tree *base,
*step = NULL_TREE; *step = NULL_TREE;
*delta = 0; *delta = 0;
/* First strip off the component references. Ignore bitfields. */ /* First strip off the component references. Ignore bitfields.
if (TREE_CODE (ref) == COMPONENT_REF Also strip off the real and imagine parts of a complex, so that
&& DECL_NONADDRESSABLE_P (TREE_OPERAND (ref, 1))) they can have the same base. */
ref = TREE_OPERAND (ref, 0); if (TREE_CODE (ref) == REALPART_EXPR
|| TREE_CODE (ref) == IMAGPART_EXPR
|| (TREE_CODE (ref) == COMPONENT_REF
&& DECL_NONADDRESSABLE_P (TREE_OPERAND (ref, 1))))
{
if (TREE_CODE (ref) == IMAGPART_EXPR)
*delta += int_size_in_bytes (TREE_TYPE (ref));
ref = TREE_OPERAND (ref, 0);
}
*ref_p = ref; *ref_p = ref;
......
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