https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78362
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Any progress on this? if (!aarch64_plus_immediate (operands[2], <MODE>mode) && can_create_pseudo_p () && !REGNO_PTR_FRAME_P (REGNO (operands[1]))) is indeed wrong, because register_operand allows not just REG, but also SUBREG of either REG, or MEM (last case only before reload). I bet for SUBREG with SUBREG_REG being a REG you want to use REGNO_PTR_FRAME_P similarly on the SUBREG_REG, for SUBREG of MEM I think the final regno is unlikely going to be REGNO_PTR_FRAME_P. So: rtx op1 = operands[1]; if (GET_CODE (op1) == SUBREG) op1 = SUBREG_REG (op1); if (!aarch64_plus_immediate (operands[2], <MODE>mode) && can_create_pseudo_p () && (!REG_P (op1) || !REGNO_PTR_FRAME_P (REGNO (op1))) ?