This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/78362] [7 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1804 during libgomp build
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Nov 2016 17:50:04 +0000
- Subject: [Bug target/78362] [7 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1804 during libgomp build
- Auto-submitted: auto-generated
- References: <bug-78362-4@http.gcc.gnu.org/bugzilla/>
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)))
?