]> git.ipfire.org Git - thirdparty/gcc.git/commit
xtensa: Make relaxed MOVI instructions treated as "load" type
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Wed, 16 Jul 2025 08:03:26 +0000 (17:03 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Tue, 22 Jul 2025 16:53:51 +0000 (09:53 -0700)
commitb1e8f118e962cbd08ab6037c05a1045df90585c5
tree0b40ca7ddcc16bfd1e11c51069c2beb367c2a960
parent0d52a736a3856871761c89fefa59c2ff39f3a5f8
xtensa: Make relaxed MOVI instructions treated as "load" type

The relaxed MOVI instructions in the Xtensa ISA are assignment ones that
contain large integer, floating-point or symbolic constants that would not
normally be allowed as immediate values by instructions in assembly code,
and will instead be translated by the assembler later rather the compiler,
into the L32R instructions referencing to literal pool entries containing
that values (see '-mauto-litpools' Xtensa-specific option).

This means that even though such instructions look like nothing more than
constant value assignments in their RTL representation, these may perform
better by treating them as loads from memory (i.e. the actual behavior)
and also trying to avoid using the value immediately after the load,
especially from an instruction scheduling perspective.

gcc/ChangeLog:

* config/xtensa/xtensa.md
(movsi_internal, movhi_internal, movsf_internal):
Change the value of the "type" attribute from "move" to "load"
when the source operand constraint is "Y".
gcc/config/xtensa/xtensa.md