https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95649

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at gcc dot gnu.org

--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
The problem here is that the code in propagate_into_phi_args() was previously
in evrp but is now in the engine itself and affecting all clients.

CCP and copyprop are two of these clients.  The subst & fold engine is changing
the CFG (phis in this case) and neither pass is expecting it.  A hack showing
that it's the PHI propagation is attached below.

We could make these passes clean-up the CFG for example, but that may be heavy
handed if they're supposed to be lightweight ??.  Instead we could either move
propagate_into_phi_args back into evrp, or only run it if a CHANGE_CFG_FLAG or
somesuch is passed to the engine constructor.

I'll work on a patch.

-------------------------

NOT A FIX:

diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index 4fda296ef9e..249867d8633 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -1228,7 +1228,7 @@ substitute_and_fold_dom_walker::before_dom_children
(basic_block bb)
        }
     }

-  substitute_and_fold_engine->propagate_into_phi_args (bb);
+  //substitute_and_fold_engine->propagate_into_phi_args (bb);

   return NULL;
 }

Reply via email to