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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-03-21
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Either:
--- gcc/config/gcn/gcn.md.jj    2020-03-03 07:57:42.363827602 +0100
+++ gcc/config/gcn/gcn.md       2020-03-21 15:35:22.395639196 +0100
@@ -625,7 +625,7 @@ (define_insn_and_split "*mov<mode>_insn"
     rtx outhi = gen_highpart_mode (SImode, <MODE>mode, operands[0]);

     /* Ensure that overlapping registers aren't corrupted.  */
-    if (REGNO (outlo) == REGNO (inhi))
+    if (REG_P (inhi) && REGNO (outlo) == REGNO (inhi))
       {
        operands[0] = outhi;
        operands[1] = inhi;
or:
--- gcc/config/gcn/gcn.md.jj    2020-03-03 07:57:42.363827602 +0100
+++ gcc/config/gcn/gcn.md       2020-03-21 15:37:45.337552515 +0100
@@ -625,7 +625,7 @@ (define_insn_and_split "*mov<mode>_insn"
     rtx outhi = gen_highpart_mode (SImode, <MODE>mode, operands[0]);

     /* Ensure that overlapping registers aren't corrupted.  */
-    if (REGNO (outlo) == REGNO (inhi))
+    if (reg_overlap_mentioned_p (outlo, inhi))
       {
        operands[0] = outhi;
        operands[1] = inhi;
ought to fix this, but I don't yet have setup where I can sufficiently test it.
I think the latter is better and is in line what other backends are using.

Reply via email to