diff options
author | liuhongt <hongtao.liu@intel.com> | 2024-02-19 13:57:24 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2024-05-29 06:59:15 +0800 |
commit | 1d6199e5f8c1c08083eeb0279f71333234fe14ad (patch) | |
tree | 3a28592bbec190fda9cec69c17c5ad225340b6d6 /gcc/analyzer | |
parent | 6f36cc2535c11b9406715836daeb87169fa79473 (diff) | |
download | gcc-1d6199e5f8c1c08083eeb0279f71333234fe14ad.zip gcc-1d6199e5f8c1c08083eeb0279f71333234fe14ad.tar.gz gcc-1d6199e5f8c1c08083eeb0279f71333234fe14ad.tar.bz2 |
Reduce cost of MEM (A + imm).
For MEM, rtx_cost iterates each subrtx, and adds up the costs,
so for MEM (reg) and MEM (reg + 4), the former costs 5,
the latter costs 9, it is not accurate for x86. Ideally
address_cost should be used, but it reduce cost too much.
So current solution is make constant disp as cheap as possible.
gcc/ChangeLog:
PR target/67325
* config/i386/i386.cc (ix86_rtx_costs): Reduce cost of MEM (A
+ imm) to "cost of MEM (A)" + 1.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr67325.c: New test.
Diffstat (limited to 'gcc/analyzer')
0 files changed, 0 insertions, 0 deletions