[Bug target/83969] [8 Regression] ICE in final_scan_insn, at final.c:2997 (error: could not split insn) for powerpc targets

bergner at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 6 02:52:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83969

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bergner at gcc dot gnu.org

--- Comment #10 from Peter Bergner <bergner at gcc dot gnu.org> ---
This looks like a similar bug I fixed in PR84279, namely mem_operand_gpr()
accepting addresses that are not offsettable.

In this specific bug, we don't have an altivec address, but we do have an index
address which also should be rejected for the "Y" constraint.  Replacing the
fix for PR84279 with a test for offsettable_address_p() instead fixes both
ICEs.  I'm testing the following patch which mimics the code for
mem_operand_ds_form():

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c  (revision 258267)
+++ gcc/config/rs6000/rs6000.c  (working copy)
@@ -8207,10 +8207,8 @@ mem_operand_gpr (rtx op, machine_mode mo
   int extra;
   rtx addr = XEXP (op, 0);

-  /* Don't allow altivec type addresses like (mem (and (plus ...))).
-     See PR target/84279.  */
-
-  if (GET_CODE (addr) == AND)
+  /* Don't allow non-offsettable addresses.  See PRs 83969 and 84279.  */
+  if (!offsettable_address_p (false, mode, addr))
     return false;

   op = address_offset (addr);


More information about the Gcc-bugs mailing list