diff options
author | Robin Dapp <rdapp@ventanamicro.com> | 2024-02-22 13:40:55 +0100 |
---|---|---|
committer | Robin Dapp <rdapp@ventanamicro.com> | 2024-02-23 21:29:02 +0100 |
commit | 85c12ae8b80902ed46c97f33dbb61533e07f2905 (patch) | |
tree | 7465acf0411ea78e94f82f2ee5c49a097b6b4d87 /gcc/cppdefault.h | |
parent | fdf9df9d55802e1d8ff0bd14585ea61b2bb9d798 (diff) | |
download | gcc-85c12ae8b80902ed46c97f33dbb61533e07f2905.zip gcc-85c12ae8b80902ed46c97f33dbb61533e07f2905.tar.gz gcc-85c12ae8b80902ed46c97f33dbb61533e07f2905.tar.bz2 |
RISC-V: Fix vec_init for simple sequences [PR114028].
For a vec_init (_a, _a, _a, _a) with _a of mode DImode we try to
construct a "superword" of two "_a"s. This only works for modes < Pmode
when we can "shift and or" both halves into one Pmode register.
This patch disallows the optimization for inner_mode == Pmode and emits
a simple broadcast in such a case.
gcc/ChangeLog:
PR target/114028
* config/riscv/riscv-v.cc (rvv_builder::can_duplicate_repeating_sequence_p):
Return false if inner mode is already Pmode.
(rvv_builder::is_all_same_sequence): New function.
(expand_vec_init): Emit broadcast if sequence is all same.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/pr114028.c: New test.
Diffstat (limited to 'gcc/cppdefault.h')
0 files changed, 0 insertions, 0 deletions