]> gcc.gnu.org Git - gcc.git/commit
internal-fn: Fix vector extraction into promoted subreg.
authorRobin Dapp <rdapp@ventanamicro.com>
Tue, 15 Aug 2023 09:43:43 +0000 (11:43 +0200)
committerJeff Law <jlaw@ventanamicro.com>
Thu, 17 Aug 2023 15:21:00 +0000 (09:21 -0600)
commit7cec887fc9571fa86683530d9fe0713eae6f5bd0
tree500d58e0723626d2301ef4ff1c8dbc9e71554f0b
parent76e89f2c5caff27b6c5a76f0105f22d0634a4d3e
internal-fn: Fix vector extraction into promoted subreg.

This patch fixes the case where vec_extract gets passed a promoted
subreg (e.g. from a return value).  This is achieved by using
expand_convert_optab_fn instead of a separate expander function.

gcc/ChangeLog:

* internal-fn.cc (vec_extract_direct): Change type argument
numbers.
(expand_vec_extract_optab_fn): Call convert_optab_fn.
(direct_vec_extract_optab_supported_p): Use
convert_optab_supported_p.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-1u.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-2u.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-3u.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-4u.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-runu.c: New test.

(cherry picked from commit c94e0f52f40310b6faeae11bae3366ccb1435199)
gcc/internal-fn.cc
gcc/testsuite/gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-1u.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-2u.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-3u.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-4u.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-runu.c [new file with mode: 0644]
This page took 0.066627 seconds and 6 git commands to generate.