]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Add else operand to masked loads [PR115336].
authorRobin Dapp <rdapp@ventanamicro.com>
Thu, 8 Aug 2024 08:31:22 +0000 (10:31 +0200)
committerRobin Dapp <rdapp@ventanamicro.com>
Mon, 18 Nov 2024 10:48:42 +0000 (11:48 +0100)
commitb89273a049a76ffc29dd43a536ad329f0d994c05
tree55bc2c014d2c2fdf0f9ea55910b6c6f4093819fe
parentebf30772415cfd3fa544fc7262b28b948591538f
RISC-V: Add else operand to masked loads [PR115336].

This patch adds else operands to masked loads.  Currently the default
else operand predicate just accepts "undefined" (i.e. SCRATCH) values.

PR middle-end/115336
PR middle-end/116059

gcc/ChangeLog:

* config/riscv/autovec.md: Add else operand.
* config/riscv/predicates.md (maskload_else_operand): New
predicate.
* config/riscv/riscv-v.cc (get_else_operand): Remove static.
(expand_load_store): Use get_else_operand and adjust index.
(expand_gather_scatter): Ditto.
(expand_lanes_load_store): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/pr115336.c: New test.
* gcc.target/riscv/rvv/autovec/pr116059.c: New test.
gcc/config/riscv/autovec.md
gcc/config/riscv/predicates.md
gcc/config/riscv/riscv-v.cc
gcc/testsuite/gcc.target/riscv/rvv/autovec/pr115336.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/pr116059.c [new file with mode: 0644]