[Bug tree-optimization/94914] Failure to optimize check of high part of 64-bit result of 32 by 32 multiplication into overflow check
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon May 4 09:13:53 GMT 2020
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.
More information about the Gcc-bugs
mailing list