This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/78362] [7 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1804 during libgomp build


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)))
?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]