On 9/7/26 8:43 AM, [email protected] wrote:
From: Kyrylo Tkachov <[email protected]>
Three noce matchers open-code the same decode when they swap the arms of the
if-region: take if_info->rev_cond and its code if there is one, otherwise keep
the original condition and reverse its code. noce_reversed_cond_code already
answers half of that question, so the two have to be kept in sync by hand.
Add noce_reversed_cond, which returns the condition and sets the code, and
express noce_reversed_cond_code in terms of it. No functional change.
gcc/ChangeLog:
* ifcvt.cc (noce_reversed_cond): New function.
(noce_reversed_cond_code): Use it.
(noce_try_addcc, noce_try_cmove_arith, noce_try_cond_arith): Likewise.
Signed-off-by: Kyrylo Tkachov <[email protected]>
I had to trace through a bit more of this, but ultimately it looks NFC
to me as well.
OK
jeff