On 8/24/2026 7:03 AM, Aldy Hernandez wrote:
Split the joiner recognition in two and export the pieces:
cond_on_phi_p recognizes the block we're interested in, and
phi_arg_from_cmp_p recognizes the PHI argument on an edge. This lets
the phiopt replication of this optimization share the DOM recognizer
code.
OK?
PR tree-optimization/126896
gcc/ChangeLog:
* tree-ssa-threadedge.cc
(edge_forwards_cmp_to_conditional_jump_through_empty_bb_p): Make
static. Split into...
(cond_on_phi_p): ...this...
(phi_arg_from_cmp_p): ...and this.
* tree-ssa-threadedge.h (cond_on_phi_p): Declare.
(phi_arg_from_cmp_p): Declare.
OK
jeff