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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/config/arm/arm.md.jj    2021-01-04 10:25:44.404170742 +0100
+++ gcc/config/arm/arm.md       2021-02-11 12:50:26.049604711 +0100
@@ -9216,6 +9216,11 @@
       else
        {
          rtx mem = force_const_mem (SImode, operands[1]);
+         if (!general_operand (mem, SImode))
+           {
+             emit_move_insn (operands[2], XEXP (mem, 0));
+             mem = replace_equiv_address (mem, operands[2], false);
+           }
          emit_move_insn (operands[2], mem);
        }
     }
@@ -9299,6 +9304,11 @@
       else
        {
          rtx mem = force_const_mem (SImode, operands[1]);
+         if (!general_operand (mem, SImode))
+           {
+             emit_move_insn (operands[3], XEXP (mem, 0));
+             mem = replace_equiv_address (mem, operands[3], false);
+           }
          emit_move_insn (operands[3], mem);
        }
     }
actually seems to work, and because before r11-3427 the code has done
emit_move_insn (operands[{2,3}], XEXP (force_const_mem (...), [0])); I think it
must work.

Reply via email to