[Bug tree-optimization/110731] [11/12/13/14 Regression] Wrong-code because of wide-int division since r5-424
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 19 07:39:15 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110731
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This should have done the negative (in the original patch):
1796 /* The quotient is neg if exactly one of the divisor or dividend is
1797 neg. */
1798 if (dividend_neg != divisor_neg)
1799 quotient_len = wi::sub_large (quotient, zeros, 1, quotient,
1800 quotient_len, dividend_prec,
1801 UNSIGNED, 0);
That is you do -((332306998946228968225951765070086143wb + 1)/2)
More information about the Gcc-bugs
mailing list