On 9/7/26 8:43 AM, [email protected] wrote:
From: Kyrylo Tkachov <[email protected]>

After the subreg fallback, every path that reaches the rest of
noce_try_cond_arith has a conditional move in TARGET: the fallback either
returns, jumps to the failure label, or ends on a gcc_assert that TARGET is
non-null.  Four later tests for a null TARGET are therefore dead, and one of
them makes the -1 costing look as though both candidates could fail, when only
the -1 candidate can.

State the invariant with a gcc_checking_assert and drop the dead tests.  No
functional change.

gcc/ChangeLog:

        * ifcvt.cc (noce_try_cond_arith): Assert that the conditional move
        exists after the subreg fallback and drop the four dead tests for it.
OK
jeff

Reply via email to