Created attachment 53780 [details] C source code For the attached code, compiled with -std=gnu89 -O3 -march=znver3 -c bug858.c recent gcc does this: during GIMPLE pass: vect src/io/trove/trove-dbpf/dbpf-open-cache.c: In function ‘dbpf_open_cache_initiali ze’: src/io/trove/trove-dbpf/dbpf-open-cache.c:100:6: internal compiler error: in bui ld_vector_from_val, at tree.cc:2125 0x1072d8e build_vector_from_val(tree_node*, tree_node*) ../../trunk.git/gcc/tree.cc:2124 0x100a927 vectorizable_recurr(_loop_vec_info*, _stmt_vec_info*, gimple**, _slp_t ree*, vec<stmt_info_for_cost, va_heap, vl_ptr>*) ../../trunk.git/gcc/tree-vect-loop.cc:8472 The bug first seems to occur sometime between git hash baeec7cc83b19b46 and 3bd5d9a28e1ce4d1, a day later. I have a reduction running.
Reduced C code seems to be: struct qlist_head { struct qlist_head *next } qlist_add(struct qlist_head *new, struct qlist_head *head) { struct qlist_head *prev = head; new->next = head->next; prev->next = new; } struct { struct qlist_head queue_link } free_list, prealloc[]; dbpf_open_cache_initialize() { int i = 0; for (; i < 64; i++) qlist_add(&prealloc[i], &free_list); }
Mine. Missing a conversion of the scalar pointer to the vector component type.
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:084128583212bd64308f50c2ab5f4c03be40e48c commit r13-3544-g084128583212bd64308f50c2ab5f4c03be40e48c Author: Richard Biener <rguenther@suse.de> Date: Fri Oct 28 13:50:57 2022 +0200 tree-optimization/107435 - ICE with recurrence vectorization This implements the missed conversion from pointer to integer. PR tree-optimization/107435 * tree-vect-loop.cc (vectorizable_recurr): Convert initial value to vector component type. * gcc.dg/torture/pr107435.c: New testcase.
Fixed.