[PR98722] LRA: Check that target has no 3-op add insn to transform 2 plus expression.
authorVladimir N. Makarov <vmakarov@redhat.com>
Wed, 20 Jan 2021 16:40:14 +0000 (11:40 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Wed, 20 Jan 2021 16:44:04 +0000 (11:44 -0500)
commit4334b524274203125193a08a8485250c41c2daa9
tree871af61bf1eacb30f9613f4d5261edfc9701fdbd
parent261cdd23195bc921737fd7a44e34a93aaaaccc44
[PR98722] LRA: Check that target has no 3-op add insn to transform 2 plus expression.

Patch cf2ac1c30af0fa783c8d72e527904dda5d8cc330 for solving PR97969 was
assumed for targets with absent 3-op add insn.  But the original patch did
not check this.  This patch adds the check.

gcc/ChangeLog:

PR rtl-optimization/98722
* lra-eliminations.c (eliminate_regs_in_insn): Check that target
has no 3-op add insn to transform insns containing two pluses.

gcc/testsuite/ChangeLog:

PR rtl-optimization/98722
* g++.target/s390/pr98722.C: New.
gcc/lra-eliminations.c
gcc/testsuite/g++.target/s390/pr98722.C [new file with mode: 0644]