]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/50058 (FAIL: g++.dg/tree-ssa/pr41186.C)
authorRichard Guenther <rguenther@suse.de>
Mon, 15 Aug 2011 12:17:33 +0000 (12:17 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 15 Aug 2011 12:17:33 +0000 (12:17 +0000)
2011-08-15  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/50058
* tree-ssa-sccvn.c (vn_reference_lookup_3): Relax aggregate
copy matching.

From-SVN: r177760

gcc/ChangeLog
gcc/tree-ssa-sccvn.c

index 32162ecd41fbda8c8eb0cc51190d9952fccd635a..58e2216f163d06db764560949216144774c7da4e 100644 (file)
@@ -1,3 +1,9 @@
+2011-08-15  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/50058
+       * tree-ssa-sccvn.c (vn_reference_lookup_3): Relax aggregate
+       copy matching.
+
 2011-08-15  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
 
        PR target/50022
index d65b9ebe9c26a1f9e350f1675ca29db1cd26ca58..4ccc0a29fd515970ed32b3f7e0bfb82f7b1f15fe 100644 (file)
@@ -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.