[avr,applied] Remove some dead code

Message ID 1df3cf07-e16a-42de-b6e0-ce38cc01bbd9@gjlay.de
State Not Applicable
Headers
Series [avr,applied] Remove some dead code |

Checks

Context Check Description
snail/gcc-patch-check fail Git am fail log

Commit Message

Georg-Johann Lay Feb. 26, 2024, 7:57 p.m. UTC
  This code was dead in the block where it lived,
because avr_adiw_reg_p() is only true when ADIW and SBIW
are available -- which is not the case for AVR_TINY.

Johann

--

AVR: Dead code removal.

gcc/
         * config/avr/avr.cc (avr_out_compare) [AVR_TINY]: Remove code in
         an "if avr_adiw_reg_p()" block that's dead for AVR_TINY.
  

Patch

diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc
index d3756a2f036..655a8e89fdc 100644
--- a/gcc/config/avr/avr.cc
+++ b/gcc/config/avr/avr.cc
@@ -6291,10 +6291,7 @@  avr_out_compare (rtx_insn *insn, rtx *xop, int *plen)
               && (val8 == 0
                   || reg_unused_after (insn, xreg)))
             {
-             if (AVR_TINY)
-               avr_asm_len (TINY_SBIW (%A0, %B0, %1), xop, plen, 2);
-             else
-               avr_asm_len ("sbiw %0,%1", xop, plen, 1);
+             avr_asm_len ("sbiw %0,%1", xop, plen, 1);

               i++;
               continue;
@@ -6305,9 +6302,7 @@  avr_out_compare (rtx_insn *insn, rtx *xop, int *plen)
               && compare_eq_p (insn)
               && reg_unused_after (insn, xreg))
             {
-             return AVR_TINY
-               ? avr_asm_len (TINY_ADIW (%A0, %B0, %n1), xop, plen, 2)
-               : avr_asm_len ("adiw %0,%n1", xop, plen, 1);
+             return avr_asm_len ("adiw %0,%n1", xop, plen, 1);
             }
         }