tree-ssa-ter.c (find_replaceable_in_bb): Allow replacement over call for single opera...
authorPat Haugen <pthaugen@us.ibm.com>
Wed, 20 Oct 2010 18:57:15 +0000 (18:57 +0000)
committerPat Haugen <pthaugen@gcc.gnu.org>
Wed, 20 Oct 2010 18:57:15 +0000 (18:57 +0000)
* tree-ssa-ter.c (find_replaceable_in_bb): Allow replacement over
call for single operand expression.

From-SVN: r165733

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

index e3a4cab..4e3c62c 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-20  Pat Haugen  <pthaugen@us.ibm.com>
+
+       * tree-ssa-ter.c (find_replaceable_in_bb): Allow replacement over
+       call for single operand expression.
+
 2010-10-20  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree-optimize.c (execute_fixup_cfg): Purge dead abnormal call edges
index 01eb7bb..0fb8028 100644 (file)
@@ -644,8 +644,10 @@ find_replaceable_in_bb (temp_expr_table_p tab, basic_block bb)
                 def variable has the same root variable as something in the
                 substitution list, or the def and use span a call such that
                 we'll expand lifetimes across a call.  */
-             if (gimple_has_volatile_ops (stmt) || same_root_var ||
-                 tab->call_cnt[ver] != cur_call_cnt)
+             if (gimple_has_volatile_ops (stmt) || same_root_var
+                 || (tab->call_cnt[ver] != cur_call_cnt
+                     && SINGLE_SSA_USE_OPERAND (SSA_NAME_DEF_STMT (use), SSA_OP_USE)
+                        == NULL_USE_OPERAND_P))
                finished_with_expr (tab, ver, true);
              else
                mark_replaceable (tab, use, stmt_replaceable);