unsigned HOST_WIDE_INT hwi_length = UINTVAL (length);
unsigned HOST_WIDE_INT factor, align;
+ if (riscv_memcpy_size_threshold >= 0
+ && hwi_length > riscv_memcpy_size_threshold)
+ return false;
+
if (riscv_slow_unaligned_access_p)
{
align = MIN (MIN (MEM_ALIGN (src), MEM_ALIGN (dest)), BITS_PER_WORD);
if (!use_vector_stringop_p (info, potential_ew, length_in))
return false;
+ if (CONST_INT_P (length_in))
+ {
+ HOST_WIDE_INT length = INTVAL (length_in);
+ if (movmem_p
+ && riscv_memmove_size_threshold >= 0
+ && length > riscv_memmove_size_threshold)
+ return false;
+ else if (!movmem_p
+ && riscv_memmove_size_threshold >= 0
+ && length > riscv_memcpy_size_threshold)
+ return false;
+ }
+ else
+ return false;
+
/* Inlining general memmove is a pessimisation: we can't avoid having to
decide which direction to go at runtime, which is costly in instruction
count however for situations where the entire move fits in one vector
if (!use_vector_stringop_p (info, 1, length_in) || info.need_loop)
return false;
+ if (CONST_INT_P (length_in))
+ {
+ HOST_WIDE_INT length = INTVAL (length_in);
+ if (riscv_memset_size_threshold >= 0
+ && length > riscv_memset_size_threshold)
+ return false;
+ }
+ else
+ return false;
+
rtx dst_addr = copy_addr_to_reg (XEXP (dst_in, 0));
rtx dst = change_address (dst_in, info.vmode, dst_addr);
Target RejectNegative Joined Enum(stringop_strategy) Var(stringop_strategy) Init(STRATEGY_AUTO)
Specify stringop expansion strategy.
+-param=memcpy-size-threshold=
+Target Joined UInteger Var(riscv_memcpy_size_threshold) Init(-1) Param
+Constant memcpy size in bytes above which to start using libcalls over inlining.
+
+-param=memmove-size-threshold=
+Target Joined UInteger Var(riscv_memmove_size_threshold) Init(-1) Param
+Constant memmove size in bytes above which to start using libcalls over inlining.
+
+-param=memset-size-threshold=
+Target Joined UInteger Var(riscv_memset_size_threshold) Init(-1) Param
+Constant memset size in bytes above which to start using libcalls over inlining.
+
Enum
Name(rvv_vector_bits) Type(enum rvv_vector_bits_enum)
The possible RVV vector register lengths: