]> git.ipfire.org Git - thirdparty/gcc.git/commit
xtensa: Fix inaccuracy in xtensa_rtx_costs()
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Wed, 16 Jul 2025 08:12:03 +0000 (17:12 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Tue, 22 Jul 2025 16:53:52 +0000 (09:53 -0700)
commitbb561b45e490377046b7ce14e8934cc8a81ec6a7
tree198d34f4837782ba0d09f93f76a511a5c63810c0
parentb1e8f118e962cbd08ab6037c05a1045df90585c5
xtensa: Fix inaccuracy in xtensa_rtx_costs()

This patch fixes the following defects in the function:

   - The cost of move instructions larger than the natural word width,
     specifically "movd[if]_internal", cannot be estimated correctly
   - Floating-point or symbolic constant assignment insns cannot be
     identified as L32R instructions

gcc/ChangeLog:

* config/xtensa/xtensa.cc (xtensa_is_insn_L32R_p):
Rewrite to capture insns that could be L32R machine instructions
wherever possible.
(xtensa_rtx_costs): Fix to consider that moves larger than a
natural word can take multiple L32R machine instructions.
(constantpool_address_p): Cosmetics.
* config/xtensa/xtensa.md (movdi_internal, movdf_internal):
Add missing insn attributes.
gcc/config/xtensa/xtensa.cc
gcc/config/xtensa/xtensa.md