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

--- Comment #9 from Bernd Schmidt <bernds at gcc dot gnu.org> ---
Maybe we just need to declare this address to be invalid for TImode. The
following seems to cure the testcase; untested otherwise.

Index: i386.c
===================================================================
--- i386.c      (revision 245685)
+++ i386.c      (working copy)
@@ -15877,7 +15877,7 @@ ix86_validate_address_register (rtx op)
    be recognized.  */

 static bool
-ix86_legitimate_address_p (machine_mode, rtx addr, bool strict)
+ix86_legitimate_address_p (machine_mode mem_mode, rtx addr, bool strict)
 {
   struct ix86_address parts;
   rtx base, index, disp;
@@ -15899,7 +15899,8 @@ ix86_legitimate_address_p (machine_mode,
     {
       rtx reg = ix86_validate_address_register (base);

-      if (reg == NULL_RTX)
+      if (reg == NULL_RTX
+         || (GET_MODE (reg) != Pmode && mem_mode == TImode))
        return false;

       if ((strict && ! REG_OK_FOR_BASE_STRICT_P (reg))

Reply via email to