This excludes value_replacement and store_elim from diamonds as they don't
handle the form properly.
gcc/ChangeLog:
PR middle-end/106534
* tree-ssa-phiopt.cc (tree_ssa_phiopt_worker): Guard the
value_replacement and store_elim from diamonds.
|| (e1->flags & EDGE_FALLTHRU) == 0)
continue;
- if (do_store_elim)
+ if (do_store_elim && !diamond_p)
{
/* Also make sure that bb1 only have one predecessor and that it
is bb. */
/* Value replacement can work with more than one PHI
so try that first. */
- if (!early_p)
+ if (!early_p && !diamond_p)
for (gsi = gsi_start (phis); !gsi_end_p (gsi); gsi_next (&gsi))
{
phi = as_a <gphi *> (gsi_stmt (gsi));