https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114396

--- Comment #7 from Robin Dapp <rdapp at gcc dot gnu.org> ---
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 4375ebdcb49..f8f7ba0ccc1 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -9454,7 +9454,7 @@ vect_peel_nonlinear_iv_init (gimple_seq* stmts, tree
init_expr,
        wi::to_mpz (skipn, exp, UNSIGNED);
        mpz_ui_pow_ui (mod, 2, TYPE_PRECISION (type));
        mpz_powm (res, base, exp, mod);
-       begin = wi::from_mpz (type, res, TYPE_SIGN (type));
+       begin = wi::from_mpz (type, res, TYPE_SIGN (utype));
        tree mult_expr = wide_int_to_tree (utype, begin);
        init_expr = gimple_build (stmts, MULT_EXPR, utype,
                                  init_expr, mult_expr);

This helps for the test case.

Reply via email to