diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-12-09 17:41:32 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2023-12-17 19:23:28 +0800 |
commit | 50b3f596bd943ec6110c1987f14e5497ce39622f (patch) | |
tree | 6522d5b2bf963409ac456d0ee01b3a7563e588bf /libphobos/libdruntime/gcc | |
parent | 5f3f11279514afaa14b4ca382c969b48fd250832 (diff) | |
download | gcc-50b3f596bd943ec6110c1987f14e5497ce39622f.zip gcc-50b3f596bd943ec6110c1987f14e5497ce39622f.tar.gz gcc-50b3f596bd943ec6110c1987f14e5497ce39622f.tar.bz2 |
LoongArch: Fix instruction costs [PR112936]
Replace the instruction costs in loongarch_rtx_cost_data constructor
based on micro-benchmark results on LA464 and LA664.
This allows optimizations like "x * 17" to alsl, and "x * 68" to alsl
and slli.
gcc/ChangeLog:
PR target/112936
* config/loongarch/loongarch-def.cc
(loongarch_rtx_cost_data::loongarch_rtx_cost_data): Update
instruction costs per micro-benchmark results.
(loongarch_rtx_cost_optimize_size): Set all instruction costs
to (COSTS_N_INSNS (1) + 1).
* config/loongarch/loongarch.cc (loongarch_rtx_costs): Remove
special case for multiplication when optimizing for size.
Adjust division cost when TARGET_64BIT && !TARGET_DIV32.
Account the extra cost when TARGET_CHECK_ZERO_DIV and
optimizing for speed.
gcc/testsuite/ChangeLog
PR target/112936
* gcc.target/loongarch/mul-const-reduction.c: New test.
Diffstat (limited to 'libphobos/libdruntime/gcc')
0 files changed, 0 insertions, 0 deletions