re PR tree-optimization/50433 (ACATS c460010 fails to compile)
authorJan Hubicka <jh@suse.cz>
Wed, 21 Sep 2011 13:10:31 +0000 (15:10 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 21 Sep 2011 13:10:31 +0000 (13:10 +0000)
PR tree-optimization/50433
* ipa-inline-analysis.c (eliminated_by_inlining_prob): Use get_base_address.

From-SVN: r179046

gcc/ChangeLog
gcc/ipa-inline-analysis.c

index fb80dc938fdcabf6ecbe98e2391827eae536d897..0f4aa869b346e6bfb3bf9767f3fd79e3a669b836 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-21  Jan Hubicka  <jh@suse.cz>
+
+       PR tree-optimization/50433
+       * ipa-inline-analysis.c (eliminated_by_inlining_prob): Use get_base_address.
+
 2011-09-21  Jakub Jelinek  <jakub@redhat.com>
 
        * config/i386/sse.md (<code><mode>3 smaxmin:VI124_128 expander): Use
index 6bc96c7788e5a46b40616ed76180c4812e5abef9..fc954b3d101779c0dc115ef9ab7e7549c40cd66d 100644 (file)
@@ -1149,18 +1149,15 @@ eliminated_by_inlining_prob (gimple stmt)
          {
            tree rhs = gimple_assign_rhs1 (stmt);
             tree lhs = gimple_assign_lhs (stmt);
-           tree inner_rhs = rhs;
-           tree inner_lhs = lhs;
+           tree inner_rhs = get_base_address (rhs);
+           tree inner_lhs = get_base_address (lhs);
            bool rhs_free = false;
            bool lhs_free = false;
 
-           while (handled_component_p (inner_lhs)
-                  || TREE_CODE (inner_lhs) == MEM_REF)
-             inner_lhs = TREE_OPERAND (inner_lhs, 0);
-           while (handled_component_p (inner_rhs)
-                  || TREE_CODE (inner_rhs) == ADDR_EXPR
-                  || TREE_CODE (inner_rhs) == MEM_REF)
-             inner_rhs = TREE_OPERAND (inner_rhs, 0);
+           if (!inner_rhs)
+             inner_rhs = rhs;
+           if (!inner_lhs)
+             inner_lhs = lhs;
 
            if (unmodified_parm (stmt, inner_rhs))
              rhs_free = true;