aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorSergei Lewis <slewis@rivosinc.com>2024-05-13 17:32:24 -0600
committerJeff Law <jlaw@ventanamicro.com>2024-05-13 17:32:24 -0600
commitdf15eb15b5f820321c81efc75f0af13ff8c0dd5b (patch)
tree48069898f9a19b1854ab5134c9a82116c61fe0fa /gcc/expr.cc
parent67476ba8adb432033993f429b1aa4ee5689fa046 (diff)
downloadgcc-df15eb15b5f820321c81efc75f0af13ff8c0dd5b.zip
gcc-df15eb15b5f820321c81efc75f0af13ff8c0dd5b.tar.gz
gcc-df15eb15b5f820321c81efc75f0af13ff8c0dd5b.tar.bz2
[PATCH v2 1/3] RISC-V: movmem for RISCV with V extension
This patchset permits generation of inlined vectorised code for movmem, setmem and cmpmem, if and only if the operation size is at least one and at most eight vector registers' worth of data. Further vectorisation rapidly becomes debatable due to code size concerns; however, for these simple cases we do have an unambiguous performance win without sacrificing too much code size compared to a libc call. Changes in v2: * run clang-format over the code in addition to the contrib/check_GNU_style.sh that was used for v1 * remove string.h include and refer to __builtin_* memory functions in multilib tests * respect stringop_strategy (don't vectorise if it doesn't include VECTOR) * use an integer constraint for movmem length parameter * use TARGET_MAX_LMUL unless riscv-autovec-lmul=dynamic to ensure we respect the user's wishes if they request specific lmul * add new unit tests to check that riscv-autovec-lmul is respected * PR target/112109 added to changelog for patch 1/3 as requested Sergei Lewis (3): RISC-V: movmem for RISCV with V extension RISC-V: setmem for RISCV with V extension RISC-V: cmpmem for RISCV with V extension gcc/ChangeLog * config/riscv/riscv.md (movmem<mode>): Use riscv_vector::expand_block_move, if and only if we know the entire operation can be performed using one vector load followed by one vector store gcc/testsuite/ChangeLog PR target/112109 * gcc.target/riscv/rvv/base/movmem-1.c: New test
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions