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

noce_try_sign_bit_splat has two arms that narrow the -1/0 splat down to a
constant, one for each orientation of the test.  They are twenty-five
identical lines apart from which of the two arm constants they use, including
the cost comparison that picks between a mask, a left shift and a right shift.

Move that into noce_splat_to_const and call it from both arms.  No functional
change.

gcc/ChangeLog:

        * ifcvt.cc (noce_splat_to_const): New function.
        (noce_try_sign_bit_splat): Use it for both orientations.

Signed-off-by: Kyrylo Tkachov <[email protected]>
OK
jeff

Reply via email to