Jeff has approved your patch. You can commit it now. Btw, CC Robin to let him know this patch. Since he will support strcpy/strlen....etc builtin with RVV instruction sequence. He will definitely needs compile option like this patch introduce. Thanks. juzhe.zhong@rivai.ai From: Li Xu Date: 2023-11-20 09:09 To: Jeff Law; gcc-patches CC: kito.cheng; palmer; juzhe.zhong Subject: Re: Re: [PATCH] RISC-V: Implement -mmemcpy-strategy= options[PR112537] I've tested it and there are no issues with regression testing. Thanks, Li Xu xuli1@eswincomputing.com From: Jeff Law Date: 2023-11-20 05:42 To: Li Xu; gcc-patches CC: kito.cheng; palmer; juzhe.zhong Subject: Re: [PATCH] RISC-V: Implement -mmemcpy-strategy= options[PR112537] On 11/16/23 22:12, Li Xu wrote: > From: xuli > > 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. This is OK assuming you have tested it to ensure there aren't any regressions in the testsuite. I don't expect problems, but let's be sure :-) Thanks, jeff