]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add processing STRICT_LOW_PART for matched reloads.
authorVladimir N. Makarov <vmakarov@redhat.com>
Thu, 4 Jun 2020 16:04:48 +0000 (12:04 -0400)
committerVladimir N. Makarov <vmakarov@redhat.com>
Thu, 4 Jun 2020 16:04:48 +0000 (12:04 -0400)
2020-06-04  Vladimir Makarov  <vmakarov@redhat.com>

PR middle-end/95464
* lra.c (lra_emit_move): Add processing STRICT_LOW_PART.
* lra-constraints.c (match_reload): Use STRICT_LOW_PART in output
reload if the original insn has it too.

gcc/lra-constraints.c
gcc/lra.c

index bf6d4a2fd4bf47caa017fc3bdf9c0ae8e53a79d5..421c453997b5e377b8b7b730f045872baf4ba02d 100644 (file)
@@ -1071,6 +1071,8 @@ match_reload (signed char out, signed char *ins, signed char *outs,
   if (find_reg_note (curr_insn, REG_UNUSED, out_rtx) == NULL_RTX)
     {
       start_sequence ();
+      if (out >= 0 && curr_static_id->operand[out].strict_low)
+       out_rtx = gen_rtx_STRICT_LOW_PART (VOIDmode, out_rtx);
       lra_emit_move (out_rtx, copy_rtx (new_out_reg));
       emit_insn (*after);
       *after = get_insns ();
index 3435cff6a1dc01dfee0af5865d50dadd9f268045..caa09d86ca6022cd285ed1a42082e89c6b8f77c5 100644 (file)
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -490,13 +490,16 @@ void
 lra_emit_move (rtx x, rtx y)
 {
   int old;
-
+  rtx_insn *insn;
+  
   if (GET_CODE (y) != PLUS)
     {
       if (rtx_equal_p (x, y))
        return;
       old = max_reg_num ();
-      rtx_insn *insn = emit_move_insn (x, y);
+
+      insn = (GET_CODE (x) != STRICT_LOW_PART
+             ? emit_move_insn (x, y) : emit_insn (gen_rtx_SET (x, y)));
       /* The move pattern may require scratch registers, so convert them
         into real registers now.  */
       if (insn != NULL_RTX)