summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-15 12:17:33 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-15 12:17:33 +0000
commit78e606ea59491f09624b3a1c546c7c354eed20e0 (patch)
tree5dafed5bf7957642b3bb13ca7a9b7d75fe2a4fef /gcc/tree-ssa-sccvn.c
parent26ff80c02a07ef9aa2298db00265c9c7aa9361b9 (diff)
downloadgcc-78e606ea59491f09624b3a1c546c7c354eed20e0.tar.gz
2011-08-15 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50058 * tree-ssa-sccvn.c (vn_reference_lookup_3): Relax aggregate copy matching. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177760 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r--gcc/tree-ssa-sccvn.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index d65b9ebe9c2..4ccc0a29fd5 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1485,12 +1485,11 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_)
may fail when comparing types for compatibility. But we really
don't care here - further lookups with the rewritten operands
will simply fail if we messed up types too badly. */
- if (j == 0 && i == 0
+ if (j == 0 && i >= 0
&& VEC_index (vn_reference_op_s, lhs_ops, 0)->opcode == MEM_REF
- && VEC_index (vn_reference_op_s, vr->operands, i)->opcode == MEM_REF
- && tree_int_cst_equal
- (VEC_index (vn_reference_op_s, lhs_ops, 0)->op0,
- VEC_index (vn_reference_op_s, vr->operands, i)->op0))
+ && VEC_index (vn_reference_op_s, lhs_ops, 0)->off != -1
+ && (VEC_index (vn_reference_op_s, lhs_ops, 0)->off
+ == VEC_index (vn_reference_op_s, vr->operands, i)->off))
i--, j--;
/* i now points to the first additional op.