diff options
author | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2018-01-19 22:16:30 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2018-01-19 22:16:30 +0000 |
commit | ef61d1ab18889896fd1487ec5222e10a68a0e58d (patch) | |
tree | a2c73240cfed9ec25243981abee10f4b164ece87 /gcc | |
parent | dba99244eaddee9153c1ae605861014f55a30f70 (diff) | |
download | gcc-ef61d1ab18889896fd1487ec5222e10a68a0e58d.zip gcc-ef61d1ab18889896fd1487ec5222e10a68a0e58d.tar.gz gcc-ef61d1ab18889896fd1487ec5222e10a68a0e58d.tar.bz2 |
re PR rtl-optimization/83147 (LRA inheritance undo on multiple sets problem)
2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR rtl-optimization/83147
* lra-constraints.c (remove_inheritance_pseudos): Use
lra_substitute_pseudo_within_insn.
From-SVN: r256902
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lra-constraints.c | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 162ae1b..8bffc66 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + + PR rtl-optimization/83147 + * lra-constraints.c (remove_inheritance_pseudos): Use + lra_substitute_pseudo_within_insn. + 2018-01-19 Tom de Vries <tom@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com> diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 97a7103..64ee2fe 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. */ |