https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88926
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- With similar changes, I analyzed gcc.dg/vect/pr25413a.c (which we then fail to vectorize). I expect the issue is similar. In scalar evolution, we get a polynomial_chrec of type unsigned long wrapped in a NOP_EXPR of type long and chrec_fold_multiply turns that into chrec_dont_know. It does print a few lines of "Analyzing # of iterations of loop" but eventually "failed: evolution of base is not affine". resolve_mixers has a promising comment above about not caring about overflows, but it doesn't actually redo the analysis (the recursion with analyze_scalar_evolution_1, interpret_gimple_assign, interpret_rhs_expr, and most importantly the chrec_convert and chrec_fold_multiply). Paradoxically, -fwrapv lets us vectorize... However, -fwrapv does not help for the testcase in this PR, so maybe the 2 are different after all.