https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112450
Bug ID: 112450
Summary: RVV vectorization ICE in vect_get_loop_mask, at
tree-vect-loop.cc:11037
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: juzhe.zhong at rivai dot ai
Target Milestone: ---
int a, b, d, e;
short c;
void f() {
for (; e; e++) {
int g = 6;
for (; g > 2; g--) {
int i = -8;
while (i < 20) {
i += 5;
a += b;
}
c *= d;
}
b--;
}
}
-O2 --param=riscv-autovec-lmul=m8 -fno-vect-cost-model
during GIMPLE pass: vect
<source>: In function 'f':
<source>:3:6: internal compiler error: in vect_get_loop_mask, at
tree-vect-loop.cc:11037
3 | void f() {
| ^
0x7fa31fe47082 __libc_start_main
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1
https://gcc.godbolt.org/z/sda87oaW5
The ICE looks pretty odd. For partial vectorization with length, we should
never
reach 'vect_get_loop_mask' which is supposed by used by partial vectorization
with mask.
And it also reaches condition:
LOOP_VINFO_PARTIAL_VECTORS_STYLE (loop_vinfo) == vect_partial_vectors_avx512
which should be unlikely for RVV.