]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Extract vector duplicate for expand_const_vector [NFC]
authorPan Li <pan2.li@intel.com>
Wed, 16 Apr 2025 07:47:21 +0000 (15:47 +0800)
committerPan Li <pan2.li@intel.com>
Sun, 27 Apr 2025 02:09:08 +0000 (10:09 +0800)
commitcf0283a8ed035e382a3870a8dce554acf7dfc82e
tree22a953d34a46f756f7004eb6aa712052c293a566
parentcf366b62f48fc5c06b76a9a78320888a9591031b
RISC-V: Extract vector duplicate for expand_const_vector [NFC]

Consider the expand_const_vector is quit long (about 500 lines)
and complicated, we would like to extract the different case
into different functions.  For example, the const vector duplicate
will be extracted into expand_const_vector_duplicate, and then
expand_const_vector_duplicate_repeating and
expand_const_vector_duplicate_default for the underlying function.

The below test suites are passed for this patch.
* The rv64gcv fully regression test.

gcc/ChangeLog:

* config/riscv/riscv-v.cc (expand_const_vector_duplicate_repeating):
Add new func to take care of vector duplicate with repeating.
(expand_const_vector_duplicate_default): Add new func to take
care of default const vector duplicate.
(expand_const_vector_duplicate): Add new func to take care
of all const vector duplicate.
(expand_const_vector): Extract const vector duplicate into
separated function.

Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/config/riscv/riscv-v.cc