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

Robin Dapp <rdapp at gcc dot gnu.org> changed:

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

--- Comment #6 from Robin Dapp <rdapp at gcc dot gnu.org> ---
The following hunk gets rid of the ICE:

diff --git a/gcc/ira.cc b/gcc/ira.cc
index d65e1b97ed8..e7e9bbc7cc3 100644
--- a/gcc/ira.cc
+++ b/gcc/ira.cc
@@ -2325,6 +2325,9 @@ decrease_live_ranges_number (void)
                            validate_replace_rtx (dest, src, q);
                            failed = 1;
                          }
+
+                       if (!failed)
+                         try_split (PATTERN (q), q, 1);
                      }

                    /* If DEST dies here, remove the death note and

Basically, in decrease_live_ranges_number, we call validate_replace_rtx which
recognizes our to-be-split insn.
I'm not fully convinced splitting is an appropriate thing to do at this point
but I think our assumption for those splitter patterns is that they should be
split by the time they reach ira/reload.  Changing them this late will violate
that assumption.

I'd like to CC Vlad here in case he has further insight.
So not having constraints is somehow the culprit but the equiv replacement in
loc_equivalence_change_p is only a downstream effect of having changed and
recognized the insn this late and not the primary reason things go wrong.

Reply via email to