[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 18 09:09:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #28 from Uros Bizjak <ubizjak at gmail dot com> 2011-07-18 09:08:39 UTC ---
Here is my latest proposed patch:

--cut here--
Index: i386.c
===================================================================
--- i386.c    (revision 176386)
+++ i386.c    (working copy)
@@ -11149,8 +11149,13 @@
         return 0;
           break;

+        case SUBREG:
+          /* Allow only subregs of DImode hard regs in PLUS chains.  */
+          if (!register_no_elim_operand (SUBREG_REG (op), DImode))
+        return 0;
+          /* FALLTHRU */
+
         case REG:
-        case SUBREG:
           if (!base)
         base = op;
           else if (!index)
--cut here--

The patch will also benefit x86_64 and x86_32. The patch allows only SUBREGs
with DImode non-eliminable hard register. This way paradoxical subregs are
avoided, and at the same time, the patch makes sure that PLUS RTX in wider mode
won't enter the address RTX (via combine pass, register elimination in reload,
etc).



More information about the Gcc-bugs mailing list