]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Handle 0.0 floating point pattern costing to match const_vector expander
authorPatrick O'Neill <patrick@rivosinc.com>
Tue, 20 Aug 2024 19:01:22 +0000 (12:01 -0700)
committerPatrick O'Neill <patrick@rivosinc.com>
Tue, 27 Aug 2024 17:03:10 +0000 (10:03 -0700)
commit282bbc9381c563c746a43bf35e93d349188cc8e8
treecb786aa513ac97337122d3853953ad096493e422
parent771256bcb9ddc478dd0a8ecf929dfda5334f0ff3
RISC-V: Handle 0.0 floating point pattern costing to match const_vector expander

The comment previously here stated that the Wc0/Wc1 cases are handled by
the vi constraint but that is not true for the 0.0 Wc0 case.

gcc/ChangeLog:

* config/riscv/riscv-v.h (valid_vec_immediate_p): Add new helper.
* config/riscv/riscv-v.cc (valid_vec_immediate_p): Ditto.
(expand_const_vector): Use new helper.
* config/riscv/riscv.cc (riscv_const_insns): Handle 0.0 floating-point
case.

Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
gcc/config/riscv/riscv-v.cc
gcc/config/riscv/riscv-v.h
gcc/config/riscv/riscv.cc