]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Add vec_extract for BI -> QI.
authorRobin Dapp <rdapp@ventanamicro.com>
Thu, 31 Aug 2023 07:18:00 +0000 (09:18 +0200)
committerRobin Dapp <rdapp@ventanamicro.com>
Fri, 1 Sep 2023 10:59:56 +0000 (12:59 +0200)
commitffbb19c6afc016f6dc001ad0f567d3216ff601b1
tree549bc512e4ee9796dbbe993de1f916b753615301
parente40edf6499576993862801640227e076b868241b
RISC-V: Add vec_extract for BI -> QI.

This patch adds a vec_extract expander that extracts a QImode from a
vector mask mode.  In doing so, it helps recognize a "live
operation"/extract last idiom for mask modes.  It fixes the ICE in
tree-vect-live-6.c by circumventing the fallback code in
extract_bit_field_1.  The problem there is still latent, though, and
needs to be addressed separately.

gcc/ChangeLog:

* config/riscv/autovec.md (vec_extract<mode>qi): New expander.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/partial/live-2.c: New test.
* gcc.target/riscv/rvv/autovec/partial/live_run-2.c: New test.
gcc/config/riscv/autovec.md
gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/live-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/live_run-2.c [new file with mode: 0644]