LRA: Implement combining secondary memory reload and original insn
authorVladimir N. Makarov <vmakarov@redhat.com>
Fri, 17 Mar 2023 12:58:58 +0000 (08:58 -0400)
committerVladimir N. Makarov <vmakarov@redhat.com>
Fri, 17 Mar 2023 13:07:20 +0000 (09:07 -0400)
commit57688950b9328cbb4a9c21eb3199f9132b5119d3
tree813adcb540e45b87fd571cc6370c443262dcff13
parentdaf20b4b83615d61bf1793e8edcd64681275e598
LRA: Implement combining secondary memory reload and original insn

LRA creates secondary memory reload insns but do not try to combine it
with the original insn.  This patch implements a simple insn combining
for such cases in LRA.

        PR rtl-optimization/109052

gcc/ChangeLog:

* lra-constraints.cc: Include hooks.h.
(combine_reload_insn): New function.
(lra_constraints): Call it.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr109052.c: New.
gcc/lra-constraints.cc
gcc/testsuite/gcc.target/i386/pr109052.c [new file with mode: 0644]