This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/51879] Missed tail merging with non-const/pure calls


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51879

--- Comment #1 from vries at gcc dot gnu.org 2012-01-18 05:41:34 UTC ---
This works for the 3 examples:
...
Index: tree-ssa-sccvn.c
===================================================================
--- tree-ssa-sccvn.c (revision 182098)
+++ tree-ssa-sccvn.c (working copy)
@@ -3360,8 +3360,7 @@ visit_use (tree use)
       /* ???  We should handle stores from calls.  */
       else if (TREE_CODE (lhs) == SSA_NAME)
         {
-          if (!gimple_call_internal_p (stmt)
-          && gimple_call_flags (stmt) & (ECF_PURE | ECF_CONST))
+          if (!gimple_call_internal_p (stmt))
         changed = visit_reference_op_call (lhs, stmt);
           else
         changed = defs_to_varying (stmt);
...

I'll test this to see what breaks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]