Edwin's patch to add a --param for a size threshold on block moves
inadvertently disabled using inline block moves for cases where the count is
unknown. This caused testsuite regressions (I don't remember which test, it
was ~6 weeks ago if not longer). I'd hoped Edwin would see the new failures,
but I suspect he's buried by transition stuff with Rivos/Meta.
This patch restores prior behavior when the count is unknown and no --param was
specified.
Bootstrapped and regression tested on both the BPI and Pioneer systems and
regression tested on riscv{32,64}-elf as well.
Pushing to the trunk after pre-commit CI does its thing.
gcc/
* config/riscv/riscv-string.cc (expand_block_move): Restore using
inlined memcpy/memmove for unknown counts if the param hasn't been
specified.
(expand_vec_setmem): Similarly for memset.
&& length > riscv_memcpy_size_threshold)
return false;
}
- else
+ else if (riscv_memmove_size_threshold != -1)
return false;
/* Inlining general memmove is a pessimisation: we can't avoid having to
&& length > riscv_memset_size_threshold)
return false;
}
- else
+ else if (riscv_memset_size_threshold != -1)
return false;
rtx dst_addr = copy_addr_to_reg (XEXP (dst_in, 0));