https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94914
Uroš Bizjak <ubizjak at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |jakub at gcc dot gnu.org Last reconfirmed| |2020-05-04 --- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> --- Confirmed. llvm: movl %edi, %eax xorl %ecx, %ecx mull %esi seto %cl movl %ecx, %eax retq gcc: movl %esi, %esi movl %edi, %edi xorl %eax, %eax imulq %rsi, %rdi shrq $32, %rdi setne %al ret GCC does have overflow checking arithmetic builtins, but I'm not sure if at the moment these are used just for UBSAN checking.