]> gcc.gnu.org Git - gcc.git/commitdiff
re PR middle-end/44684 (FAIL: g++.dg/opt/pmf1.C)
authorRichard Guenther <rguenther@suse.de>
Sun, 27 Jun 2010 08:10:45 +0000 (08:10 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sun, 27 Jun 2010 08:10:45 +0000 (08:10 +0000)
2010-06-27  Richard Guenther  <rguenther@suse.de>

PR middle-end/44684
* tree-ssa-alias.c (refs_may_alias_p_1): Allow SSA name refs.
(stmt_may_clobber_ref_p_1): Do not bother to call the oracle
for register LHS.  Or non-store assignments.

From-SVN: r161456

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

index 624af3d574734d278b4dcff99282d33e7566c6fd..1281858524894a2367ed2391df51f973930bee2e 100644 (file)
@@ -1,3 +1,10 @@
+2010-06-27  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/44684
+       * tree-ssa-alias.c (refs_may_alias_p_1): Allow SSA name refs.
+       (stmt_may_clobber_ref_p_1): Do not bother to call the oracle
+       for register LHS.  Or non-store assignments.
+
 2010-06-26  Eric Botcazou  <ebotcazou@adacore.com>
 
        * config/sparc/sparc.c (sparc_emit_set_const32): Make static.
index 95f26f1ed0a79a61a96a9e7e4342c03428024e82..28b8fb779c2e74d9a01c0b11be4e7da0cdb8b27a 100644 (file)
@@ -801,11 +801,13 @@ refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p)
   alias_set_type set;
 
   gcc_checking_assert ((!ref1->ref
+                       || TREE_CODE (ref1->ref) == SSA_NAME
                        || DECL_P (ref1->ref)
                        || handled_component_p (ref1->ref)
                        || INDIRECT_REF_P (ref1->ref)
                        || TREE_CODE (ref1->ref) == TARGET_MEM_REF)
                       && (!ref2->ref
+                          || TREE_CODE (ref2->ref) == SSA_NAME
                           || DECL_P (ref2->ref)
                           || handled_component_p (ref2->ref)
                           || INDIRECT_REF_P (ref2->ref)
@@ -1409,11 +1411,15 @@ stmt_may_clobber_ref_p_1 (gimple stmt, ao_ref *ref)
 
       return call_may_clobber_ref_p_1 (stmt, ref);
     }
-  else if (is_gimple_assign (stmt))
+  else if (gimple_assign_single_p (stmt))
     {
-      ao_ref r;
-      ao_ref_init (&r, gimple_assign_lhs (stmt));
-      return refs_may_alias_p_1 (ref, &r, true);
+      tree lhs = gimple_assign_lhs (stmt);
+      if (!is_gimple_reg (lhs))
+       {
+         ao_ref r;
+         ao_ref_init (&r, gimple_assign_lhs (stmt));
+         return refs_may_alias_p_1 (ref, &r, true);
+       }
     }
   else if (gimple_code (stmt) == GIMPLE_ASM)
     return true;
This page took 0.078753 seconds and 5 git commands to generate.