aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>2023-03-10 11:02:05 +0800
committerKito Cheng <kito.cheng@sifive.com>2023-03-14 00:25:10 +0800
commit7ff57009bcc728044ba2de339ecd16721d48aba3 (patch)
tree80440de803912b430a8353eb69e2a9950bd055dc /libgcc
parentced122b849b8961b854053f0d1ac96983c5802e5 (diff)
downloadgcc-7ff57009bcc728044ba2de339ecd16721d48aba3.zip
gcc-7ff57009bcc728044ba2de339ecd16721d48aba3.tar.gz
gcc-7ff57009bcc728044ba2de339ecd16721d48aba3.tar.bz2
RISC-V: Fine tune RA constraint for narrow instructions
According to RVV ISA, for narrow instructions: The destination EEW is smaller than the source EEW and the overlap is in the lowest-numbered part of the source register group. (e.g., when LMUL=1, vnsrl.wi v0, v0, 3 is legal, but a destination of v1 is not). We should allow narrow instructions partially overlap base on the rule of RVV ISA above so that we could exploit the useage of vector registers. Consider these cases: https://godbolt.org/z/o6sc4eqGj some cases in LLVM have redundant move instructions, some cases in LLVM have redundant register spillings. Now after this patch, GCC can have perfect RA && codegen for different pressure RA cases. gcc/ChangeLog: * config/riscv/vector.md: Fine tune RA constraints. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/narrow_constraint-1.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-10.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-11.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-2.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-3.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-4.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-5.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-6.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-7.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-8.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-9.c: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions