https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126446
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem is that check fails:
109 // if index is a constant, then check the bounds
110 poly_uint64 idx_poly;
111 if (poly_int_tree_p (idx, &idx_poly))
112 {
113 poly_uint64 nelts = TYPE_VECTOR_SUBPARTS (TREE_TYPE
(view_op0));
114 if (known_gt (idx_poly, nelts))
115 return false;
116 }
Because idx is
<integer_cst 0x7fffe960ff90 type <integer_type 0x7fffe981d888 long long int>
constant -2878966870562407445>
poly_int_tree_p is false for it, because it is negative INTEGER_CST.
Perhaps else if (tree_fits_poly_int64_p (idx)) return false; ? (because then it
has to be negative when it doesn't fit into poly_uint64).