public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/3] LoongArch: Fix instruction costs
@ 2023-12-09 17:03 Xi Ruoyao
  2023-12-09 17:03 ` [PATCH 1/3] LoongArch: Include rtl.h for COSTS_N_INSNS instead of hard coding our own Xi Ruoyao
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Xi Ruoyao @ 2023-12-09 17:03 UTC (permalink / raw)
  To: gcc-patches; +Cc: chenglulu, i, xuchenghua, c, Xi Ruoyao

Update LoongArch instruction costs based on the micro-benchmark results
on LA464 and LA664.  In particular, this allows generating alsl/slli or
alsl/slli + add pairs for multiplying some constants as on LA464/LA664
a mul instruction is 4x slower than alsl, slli, or add instructions.

Bootstrapped and regtested on loongarch64-linux-gnu.  Ok for trunk?

Xi Ruoyao (3):
  LoongArch: Include rtl.h for COSTS_N_INSNS instead of hard coding our
    own
  LoongArch: Fix instruction costs [PR112936]
  LoongArch: Add alslsi3_extend

 gcc/config/loongarch/loongarch-def.cc         | 42 ++++++++++---------
 gcc/config/loongarch/loongarch.cc             | 22 +++++-----
 gcc/config/loongarch/loongarch.md             | 12 ++++++
 .../loongarch/mul-const-reduction.c           | 11 +++++
 4 files changed, 56 insertions(+), 31 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/loongarch/mul-const-reduction.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-12-17 15:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-09 17:03 [PATCH 0/3] LoongArch: Fix instruction costs Xi Ruoyao
2023-12-09 17:03 ` [PATCH 1/3] LoongArch: Include rtl.h for COSTS_N_INSNS instead of hard coding our own Xi Ruoyao
2023-12-13 12:57   ` chenglulu
2023-12-09 17:03 ` [PATCH 2/3] LoongArch: Fix instruction costs [PR112936] Xi Ruoyao
2023-12-13 12:22   ` chenglulu
2023-12-13 13:20     ` Xi Ruoyao
2023-12-14  1:16       ` chenglulu
2023-12-15  7:56         ` chenglulu
2023-12-17  3:02           ` chenglulu
2023-12-09 17:03 ` [PATCH 3/3] LoongArch: Add alslsi3_extend Xi Ruoyao
2023-12-13 12:58   ` chenglulu
2023-12-17 15:22 ` Pushed: [PATCH 0/3] LoongArch: Fix instruction costs Xi Ruoyao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).