On 2/10/25 2:22 AM, Georg-Johann Lay wrote:

Then avr.cc has this:

/* Implement `TARGET_LEGITIMATE_COMBINED_INSN'.  */
/* PR78883: Filter out paradoxical SUBREGs of MEM which are not handled
    properly by following passes.  As INSN_SCHEDULING is off and hence
    general_operand accepts such expressions, ditch them now.  */

static bool
avr_legitimate_combined_insn (rtx_insn *insn)
{
   subrtx_iterator::array_type array;

   FOR_EACH_SUBRTX (iter, array, PATTERN (insn), NONCONST)
     {
       const_rtx op = *iter;

       if (SUBREG_P (op)
       && MEM_P (SUBREG_REG (op))
       && (GET_MODE_SIZE (GET_MODE (op))
           > GET_MODE_SIZE (GET_MODE (SUBREG_REG (op)))))
     {
       return false;
     }
     }

   return true;
}

So some middel-end passes don't properly apply that hook.

Or are you saying that avr is missing yet another hook to
defeat stuff like r30:SI ?
Sounds more like a reload or an avr backend problem. Everything looks fine as we leave IRA.

jeff

Reply via email to