]>
git.ipfire.org Git - thirdparty/gcc.git/commit
VECT: Support loop len control on EXTRACT_LAST vectorization
Hi, @Richi and @Richard, base on previous disscussion, I simpily fix issuses for
powerpc and s390 with your suggestions:
- machine_mode len_load_mode = get_len_load_store_mode
- (loop_vinfo->vector_mode, true).require ();
- machine_mode len_store_mode = get_len_load_store_mode
- (loop_vinfo->vector_mode, false).require ();
+ machine_mode len_load_mode, len_store_mode;
+ if (!get_len_load_store_mode (loop_vinfo->vector_mode, true)
+ .exists (&len_load_mode))
+ return false;
+ if (!get_len_load_store_mode (loop_vinfo->vector_mode, false)
+ .exists (&len_store_mode))
+ return false;
Co-Authored-By: Kewen.Lin <linkw@linux.ibm.com>
gcc/ChangeLog:
* tree-vect-loop.cc (vect_verify_loop_lens): Add exists check.
(vectorizable_live_operation): Add live vectorization for length loop
control.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/partial/live-1.c: New test.
* gcc.target/riscv/rvv/autovec/partial/live_run-1.c: New test.