[Bug target/126446] [13/14/15/16/17 Regression] X86-64: ICE at -O1 -mavx2 during RTL pass: vregs since r12-2085

"jakub at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
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).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.