https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117266
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Also you are mixing two different issues together. First is the multiply N*N->2N which is fixed with _BitInt by casting; though maybe there should be a way added to get what the precission of the _BitInt type is. Second is the division which is solved by _BitInt by casting too. By doing: (((larger_type)low) | (((larger_type)high)<<shift))/divisor . But most of the targets don't support a full division here and your __builtin_div2 won't actually be using the instruction; that is even for x86_64, you only get 128/64->64 rather than 128/64->128