]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Robustify vec_init pattern[NFC]
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Fri, 10 Nov 2023 03:33:16 +0000 (11:33 +0800)
committerPan Li <pan2.li@intel.com>
Fri, 10 Nov 2023 08:16:41 +0000 (16:16 +0800)
commit072a409803a270fd3e8f8aa1b4f9bb8e83789b85
treea4db98cbd61ecfe6cc67ccb06317ac6956e95885
parent040e5b0edbca861196d9e2ea2af5e805769c8d5d
RISC-V: Robustify vec_init pattern[NFC]

Although current GCC didn't cause ICE when I create FP16 vec_init case
with -march=rv64gcv (no ZVFH), current vec_init pattern looks wrong.

Since V_VLS FP16 predicate is TARGET_VECTOR_ELEN_FP_16, wheras vec_init
needs vfslide1down/vfslide1up.

It makes more sense to robustify the vec_init patterns which split them
into 2 patterns (one is integer, the other is float) like other autovectorization patterns.

gcc/ChangeLog:

* config/riscv/autovec.md (vec_init<mode><vel>): Split patterns.
gcc/config/riscv/autovec.md