https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92033
--- Comment #1 from prathamesh3492 at gcc dot gnu.org --- This seems to happen pretty much for any arithmetic ops inside loop with SVE. For instance, with cases: for (int i = 0; i < N; i++) dst[i] = ~in1[i]; for (int i = 0; i < N; i++) dst[i] = in1[i] + in2[i]; The following workaround "fixes" the issue by punting on POLY_INT_CST in range_operator::fold_range, but not sure if that's the correct approach. diff --git a/gcc/range-op.cc b/gcc/range-op.cc index fc31485384b..93eb59436dc 100644 --- a/gcc/range-op.cc +++ b/gcc/range-op.cc @@ -148,6 +148,13 @@ range_operator::fold_range (tree type, if (empty_range_check (r, lh, rh)) return r; + if (POLY_INT_CST_P (lh.min ()) || POLY_INT_CST_P (lh.max ()) + || POLY_INT_CST_P (rh.min ()) || POLY_INT_CST_P (rh.max ())) + { + r.set_varying (lh.type ()); + return r; + } + for (unsigned x = 0; x < lh.num_pairs (); ++x) for (unsigned y = 0; y < rh.num_pairs (); ++y) { Thanks, Prathamesh