]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Optimize single-used address with -mexplicit-relocs=auto for fld/fst
authorXi Ruoyao <xry111@xry111.site>
Mon, 30 Oct 2023 12:24:58 +0000 (20:24 +0800)
committerXi Ruoyao <xry111@xry111.site>
Mon, 13 Nov 2023 06:15:07 +0000 (14:15 +0800)
commit2e0a1f778cafd164f8205ff3204a6076ffef0c77
treeb691dbd5057af70bdbd2fcf63944881a7c64ae16
parentb88500e0bc1e9e3a396ba764f9b701d22a76818f
LoongArch: Optimize single-used address with -mexplicit-relocs=auto for fld/fst

fld and fst have same address mode as ld.w and st.w, so the same
optimization as r14-4851 should be applied for them too.

gcc/ChangeLog:

* config/loongarch/loongarch.md (LD_AT_LEAST_32_BIT): New mode
iterator.
(ST_ANY): New mode iterator.
(define_peephole2): Use LD_AT_LEAST_32_BIT instead of GPR and
ST_ANY instead of QHWD for applicable patterns.
gcc/config/loongarch/loongarch.md