From: Andreas Krebbel Date: Fri, 19 Jan 2018 22:16:30 +0000 (+0000) Subject: re PR rtl-optimization/83147 (LRA inheritance undo on multiple sets problem) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef61d1ab18889896fd1487ec5222e10a68a0e58d;p=gcc.git re PR rtl-optimization/83147 (LRA inheritance undo on multiple sets problem) 2018-01-19 Andreas Krebbel PR rtl-optimization/83147 * lra-constraints.c (remove_inheritance_pseudos): Use lra_substitute_pseudo_within_insn. From-SVN: r256902 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 162ae1b1283..8bffc6627d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-19 Andreas Krebbel + + PR rtl-optimization/83147 + * lra-constraints.c (remove_inheritance_pseudos): Use + lra_substitute_pseudo_within_insn. + 2018-01-19 Tom de Vries Cesar Philippidis diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 97a71030775..64ee2fec3c5 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -6719,10 +6719,12 @@ remove_inheritance_pseudos (bitmap remove_pseudos) { lra_assert (GET_MODE (SET_SRC (prev_set)) == GET_MODE (regno_reg_rtx[sregno])); - if (GET_CODE (SET_SRC (set)) == SUBREG) - SUBREG_REG (SET_SRC (set)) = SET_SRC (prev_set); - else - SET_SRC (set) = SET_SRC (prev_set); + /* Although we have a single set, the insn can + contain more one sregno register occurrence + as a source. Change all occurrences. */ + lra_substitute_pseudo_within_insn (curr_insn, sregno, + SET_SRC (prev_set), + false); /* As we are finishing with processing the insn here, check the destination too as it might inheritance pseudo for another pseudo. */