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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
That is, sth like

Index: gcc/tree-ssa-ter.c
===================================================================
--- gcc/tree-ssa-ter.c  (revision 204664)
+++ gcc/tree-ssa-ter.c  (working copy)
@@ -438,6 +439,12 @@ ter_is_replaceable_p (gimple stmt)
          && !is_gimple_val (gimple_assign_rhs1 (stmt)))
        return false;

+      /* Do not propagate "modeless" constants - we may end up confusing the
RTL
+        expanders.  Leave the optimization to RTL CCP.  */
+      if (gimple_assign_single_p (stmt)
+         && CONSTANT_CLASS_P (gimple_assign_rhs1 (stmt)))
+       return false;
+
       return true;
     }
   return false;

Reply via email to