Don't inline finding of the virtual op phi node, instead use get_virtual_phi.
This is based on the review of a different patch (https://gcc.gnu.org/pipermail/gcc-patches/2025-June/686076.html).
Pushed as obvious after a bootstrap/test on x86_64-linux-gnu.
gcc/ChangeLog:
* tree-ssa-phiopt.cc (cond_if_else_store_replacement): Use get_virtual_phi
instead of inlining it.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
/* Handle the case with single store in THEN_BB and ELSE_BB. That is
cheap enough to always handle as it allows us to elide dependence
checking. */
- gphi *vphi = NULL;
- for (gphi_iterator si = gsi_start_phis (join_bb); !gsi_end_p (si);
- gsi_next (&si))
- if (virtual_operand_p (gimple_phi_result (si.phi ())))
- {
- vphi = si.phi ();
- break;
- }
+ gphi *vphi = get_virtual_phi (join_bb);
if (!vphi)
return false;
tree then_vdef = PHI_ARG_DEF_FROM_EDGE (vphi, single_succ_edge (then_bb));