]> gcc.gnu.org Git - gcc.git/commit
RISC-V: Implement -mmemcpy-strategy= options[PR112537]
authorxuli <xuli1@eswincomputing.com>
Fri, 17 Nov 2023 04:48:47 +0000 (04:48 +0000)
committerxuli <xuli1@eswincomputing.com>
Mon, 20 Nov 2023 02:50:09 +0000 (02:50 +0000)
commite6269bb69c0734a5af716bfbded3621de6ca351d
tree495951a746636087f774fc5126ee26160946e27a
parent8bccee51f0deac64b79cd9ad75df599422f4c8ff
RISC-V: Implement -mmemcpy-strategy= options[PR112537]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112537

-mmemcpy-strategy=[auto|libcall|scalar|vector]

auto: Current status, use scalar or vector instructions.
libcall: Always use a library call.
scalar: Only use scalar instructions.
vector: Only use vector instructions.

PR target/112537

gcc/ChangeLog:

* config/riscv/riscv-opts.h (enum riscv_stringop_strategy_enum): Strategy enum.
* config/riscv/riscv-string.cc (riscv_expand_block_move): Disabled based on options.
(expand_block_move): Ditto.
* config/riscv/riscv.opt: Add -mmemcpy-strategy=.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/cpymem-strategy-1.c: New test.
* gcc.target/riscv/rvv/base/cpymem-strategy-2.c: New test.
* gcc.target/riscv/rvv/base/cpymem-strategy-3.c: New test.
* gcc.target/riscv/rvv/base/cpymem-strategy-4.c: New test.
* gcc.target/riscv/rvv/base/cpymem-strategy-5.c: New test.
* gcc.target/riscv/rvv/base/cpymem-strategy.h: New test.
gcc/config/riscv/riscv-opts.h
gcc/config/riscv/riscv-string.cc
gcc/config/riscv/riscv.opt
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy.h [new file with mode: 0644]
This page took 0.060833 seconds and 6 git commands to generate.