https://gcc.gnu.org/g:f1c30c6213fb228f1e8b5973d10c868b834a4acd
commit r15-7794-gf1c30c6213fb228f1e8b5973d10c868b834a4acd Author: Uros Bizjak <ubiz...@gmail.com> Date: Mon Mar 3 17:04:54 2025 +0100 combine: Reverse negative logic in ternary operator Reverse negative logic in !a ? b : c to become a ? c : b. No functional changes. gcc/ChangeLog: * combine.cc (distribute_notes): Reverse negative logic in ternary operators. Diff: --- gcc/combine.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gcc/combine.cc b/gcc/combine.cc index 1b2bd34748ec..892d37641e99 100644 --- a/gcc/combine.cc +++ b/gcc/combine.cc @@ -14515,9 +14515,9 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2, if (from_insn != i3) break; - if (! (REG_P (XEXP (note, 0)) - ? find_regno_note (i3, REG_UNUSED, REGNO (XEXP (note, 0))) - : find_reg_note (i3, REG_UNUSED, XEXP (note, 0)))) + if (REG_P (XEXP (note, 0)) + ? find_reg_note (i3, REG_UNUSED, XEXP (note, 0)) + : find_regno_note (i3, REG_UNUSED, REGNO (XEXP (note, 0)))) place = i3; } /* Otherwise, if this register is used by I3, then this register @@ -14525,9 +14525,9 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2, is one already. */ else if (reg_referenced_p (XEXP (note, 0), PATTERN (i3))) { - if (! (REG_P (XEXP (note, 0)) - ? find_regno_note (i3, REG_DEAD, REGNO (XEXP (note, 0))) - : find_reg_note (i3, REG_DEAD, XEXP (note, 0)))) + if (REG_P (XEXP (note, 0)) + ? find_reg_note (i3, REG_DEAD, XEXP (note, 0)) + : find_regno_note (i3, REG_DEAD, REGNO (XEXP (note, 0)))) { PUT_REG_NOTE_KIND (note, REG_DEAD); place = i3; @@ -14564,11 +14564,11 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2, { if (!reg_set_p (XEXP (note, 0), PATTERN (i2))) PUT_REG_NOTE_KIND (note, REG_DEAD); - if (! (REG_P (XEXP (note, 0)) - ? find_regno_note (i2, REG_NOTE_KIND (note), - REGNO (XEXP (note, 0))) - : find_reg_note (i2, REG_NOTE_KIND (note), - XEXP (note, 0)))) + if (REG_P (XEXP (note, 0)) + ? find_reg_note (i2, REG_NOTE_KIND (note), + XEXP (note, 0)) + : find_regno_note (i2, REG_NOTE_KIND (note), + REGNO (XEXP (note, 0)))) place = i2; } }