Commit 8bf43909 by Richard Guenther Committed by Richard Biener

tree-ssa-sccvn.c (vn_reference_eq): Also compare if both bases are dereferenced.

2012-01-25  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-sccvn.c (vn_reference_eq): Also compare if both
	bases are dereferenced.

From-SVN: r183522
parent 15071f64
2012-01-25 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_eq): Also compare if both
bases are dereferenced.
2012-01-25 Andrey Belevantsev <abel@ispras.ru> 2012-01-25 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/48374 PR rtl-optimization/48374
......
...@@ -556,6 +556,7 @@ vn_reference_eq (const void *p1, const void *p2) ...@@ -556,6 +556,7 @@ vn_reference_eq (const void *p1, const void *p2)
tem1.type = TREE_TYPE (tem1.op0); tem1.type = TREE_TYPE (tem1.op0);
tem1.opcode = TREE_CODE (tem1.op0); tem1.opcode = TREE_CODE (tem1.op0);
vro1 = &tem1; vro1 = &tem1;
deref1 = false;
} }
if (deref2 && vro2->opcode == ADDR_EXPR) if (deref2 && vro2->opcode == ADDR_EXPR)
{ {
...@@ -564,7 +565,10 @@ vn_reference_eq (const void *p1, const void *p2) ...@@ -564,7 +565,10 @@ vn_reference_eq (const void *p1, const void *p2)
tem2.type = TREE_TYPE (tem2.op0); tem2.type = TREE_TYPE (tem2.op0);
tem2.opcode = TREE_CODE (tem2.op0); tem2.opcode = TREE_CODE (tem2.op0);
vro2 = &tem2; vro2 = &tem2;
deref2 = false;
} }
if (deref1 != deref2)
return false;
if (!vn_reference_op_eq (vro1, vro2)) if (!vn_reference_op_eq (vro1, vro2))
return false; return false;
++j; ++j;
......
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