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

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note this now mostly controls early and gimple-time optimization, the expansion
to RTL will use BRANCH_COST and friends to decide whether if (a | b) is
expanded into one or two branches.

LOGICAL_OP_NON_SHORT_CIRCUIT is one source of early IL differences and thus
target dependent divergence of behavior during GIMPLE optimizations.

In the end I'd like to have us short-circuit always during gimplification
and GENERIC folding (but late re-gimplification has to non-short-circuit)
and keep the current behavior for passes like ifcombine (I'll note it's
currently not looked at by phiopt ...).

Iff FP and INT cset has different costs we should see to expose that
to the middle-end in a way, like instead of just looking at BRANCH_COST
we should compare it with a new CSET_COST (mode).  OTOH even a conditional
branch on FP compare can be more expensive if the FP compare doesn't set CC?

Reply via email to