diff options
author | Vladimir N. Makarov <vmakarov@redhat.com> | 2025-03-17 15:21:46 -0400 |
---|---|---|
committer | Vladimir N. Makarov <vmakarov@redhat.com> | 2025-03-17 15:25:57 -0400 |
commit | 8e0e17677afc1a93aa31b8b83849848b7bb52b9b (patch) | |
tree | 4b5b55ce69596970015d38069334612b68cf7af2 /gcc/testsuite/c-c++-common/raw-string-7.c | |
parent | 96698551b8e19fc33637908190f121e039301993 (diff) | |
download | gcc-8e0e17677afc1a93aa31b8b83849848b7bb52b9b.zip gcc-8e0e17677afc1a93aa31b8b83849848b7bb52b9b.tar.gz gcc-8e0e17677afc1a93aa31b8b83849848b7bb52b9b.tar.bz2 |
[PR119285][IRA]: Use an additional way of reg equiv invariant substitution correctness
Patch for PR114991 resulted in 5% decrease of SPEC2017 lbm performance
on Zen2 and Zen4. For one RTL insn of lbm, LRA with PR114991 patch
can not confirm that the equivalence insertion will create a valid RTL
insn. This resulted in that the pseudo equiv was assumed costly and
pseudo was assigned to hard reg (caller saved as the pseudo lives
through calls) and some other pseudos did not get hard regs as it was
before PR114991 patch. The insn in question is `pseudo1 = pseduo2 +
pseudo3` where pseudo2 has equiv `hard_reg + const`. The old code
recognized the insn after equiv substitution as LEA. The new code
failed. The patch here makes to use two ways for equiv subsbtitution
correctness, the old one and new one (mostly for memory addresses
where the old code fails to find the substitution correctness). So
given patch fixes lbm performance degradation and actually makes GCC
to generate the same code as it was before PR114991 patch.
gcc/ChangeLog:
PR rtl-optimization/119285
* ira-costs.cc (equiv_can_be_consumed_p): Use 2 ways for
recognizing a valid insn after equiv insertion.
Diffstat (limited to 'gcc/testsuite/c-c++-common/raw-string-7.c')
0 files changed, 0 insertions, 0 deletions