]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Use widening shift for scatter/gather if applicable.
authorRobin Dapp <rdapp@ventanamicro.com>
Fri, 10 May 2024 11:37:03 +0000 (13:37 +0200)
committerRobin Dapp <rdapp@ventanamicro.com>
Fri, 31 May 2024 19:54:49 +0000 (21:54 +0200)
commit309ee005aa871286c8daccbce7586f82be347440
tree0dddcb76201705cfb1b42df35ed58f69a6a94e1f
parentaf4bf422a699de0e7af5a26e02997d313e7301a6
RISC-V: Use widening shift for scatter/gather if applicable.

With the zvbb extension we can emit a widening shift for scatter/gather
index preparation in case we need to multiply by 2 and zero extend.

The patch also adds vwsll to the mode_idx attribute and removes the
mode from shift-count operand of the insn pattern.

gcc/ChangeLog:

* config/riscv/riscv-v.cc (expand_gather_scatter): Use vwsll if
applicable.
* config/riscv/vector-crypto.md: Remove mode from vwsll shift
count operator.
* config/riscv/vector.md: Add vwsll to mode iterator.

gcc/testsuite/ChangeLog:

* lib/target-supports.exp: Add zvbb.
* gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_64-12-zvbb.c: New test.
gcc/config/riscv/riscv-v.cc
gcc/config/riscv/vector-crypto.md
gcc/config/riscv/vector.md
gcc/testsuite/gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_64-12-zvbb.c [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp