[Bug target/112538] [RISC-V] Failed to disable V-ext autovectorization using the '--param riscv-autovec-preference=none'

2023-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112538

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|UNCONFIRMED |RESOLVED

--- Comment #2 from Andrew Pinski  ---
Dup.

*** This bug has been marked as a duplicate of bug 112537 ***

[Bug target/112538] [RISC-V] Failed to disable V-ext autovectorization using the '--param riscv-autovec-preference=none'

2023-11-14 Thread juzhe.zhong at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112538

JuzheZhong  changed:

   What|Removed |Added

 CC||juzhe.zhong at rivai dot ai

--- Comment #1 from JuzheZhong  ---
Duplicate bug of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112537

It generates vector codes since it is lower int __builtin_memcpy

https://godbolt.org/z/f36feoW6x

Current expanding memcpy into RVV by default as long as TARGET_VECTOR is true.

More details see expand_block_move in riscv-string.cc

Maybe you need to add 

  if (!flag_tree_vectorize)
return false;

in expand_block_move .