]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Use LSX and LASX for block move
authorXi Ruoyao <xry111@xry111.site>
Tue, 5 Sep 2023 13:02:38 +0000 (21:02 +0800)
committerXi Ruoyao <xry111@xry111.site>
Sat, 9 Sep 2023 06:32:55 +0000 (14:32 +0800)
commit35adc54b55aa199f17e2c84e382792e424b6171e
tree4f6baa46f463fd871e4648a531734dc5d72dbc6b
parentdf9a25384e6c484643b48b59b4e6e07504889b61
LoongArch: Use LSX and LASX for block move

gcc/ChangeLog:

* config/loongarch/loongarch.h (LARCH_MAX_MOVE_PER_INSN):
Define to the maximum amount of bytes able to be loaded or
stored with one machine instruction.
* config/loongarch/loongarch.cc (loongarch_mode_for_move_size):
New static function.
(loongarch_block_move_straight): Call
loongarch_mode_for_move_size for machine_mode to be moved.
(loongarch_expand_block_move): Use LARCH_MAX_MOVE_PER_INSN
instead of UNITS_PER_WORD.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/memcpy-vec-1.c: New test.
* gcc.target/loongarch/memcpy-vec-2.c: New test.
* gcc.target/loongarch/memcpy-vec-3.c: New test.
gcc/config/loongarch/loongarch.cc
gcc/config/loongarch/loongarch.h
gcc/testsuite/gcc.target/loongarch/memcpy-vec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/loongarch/memcpy-vec-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c [new file with mode: 0644]