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

--- Comment #13 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Vladimir Makarov from comment #11)
> Created attachment 40372 [details]
> The proposed patch

Agreed your additions to my change looks good.  However, I'm not so sure about
this last hunk:

-    SET_SRC (curr_insn_set) = new_reg;
+    {
+      SET_SRC (curr_insn_set) = new_reg;
+      if (SUBREG_P (src))
+       SUBREG_REG (SET_SRC (curr_insn_set)) = new_reg;
+      else
+       SET_SRC (curr_insn_set) = new_reg;
+    }

Specifically, I don't think you meant to leave the following code as part of
that:

+      SET_SRC (curr_insn_set) = new_reg;

since after we execute that, SET_SRC (curr_insn_set) won't be
a subreg anymore and the following:

+       SUBREG_REG (SET_SRC (curr_insn_set)) = new_reg;

won't end well.  I think we want your patch minus that one line.

Reply via email to