* [Bug middle-end/12086] memcmp(i,j,4) should use word (SI) subtraction
[not found] <bug-12086-4@http.gcc.gnu.org/bugzilla/>
@ 2014-11-16 18:53 ` gcc-bugzilla at contacts dot eelis.net
2014-11-16 19:03 ` owner at bugs dot debian.org
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: gcc-bugzilla at contacts dot eelis.net @ 2014-11-16 18:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086
Eelis <gcc-bugzilla at contacts dot eelis.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc-bugzilla at contacts dot eelis
| |.net
--- Comment #11 from Eelis <gcc-bugzilla at contacts dot eelis.net> ---
This bug means that for
struct X { char a[8]; };
bool f(X x, X y) { return __builtin_memcmp(x.a, y.a, 8); }
gcc emits:
subq $40, %rsp
.cfi_def_cfa_offset 48
movl $8, %edx
movq %rdi, 16(%rsp)
leaq 16(%rsp), %rdi
movq %rsi, (%rsp)
movq %rsp, %rsi
call memcmp
testl %eax, %eax
setne %al
addq $40, %rsp
.cfi_def_cfa_offset 8
ret
while clang emits:
movq %rdi, -8(%rsp)
movq %rsi, -16(%rsp)
cmpq %rsi, -8(%rsp)
setne %al
retq
(which is still suboptimal due to llvm bug #20673).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/12086] memcmp(i,j,4) should use word (SI) subtraction
[not found] <bug-12086-4@http.gcc.gnu.org/bugzilla/>
2014-11-16 18:53 ` gcc-bugzilla at contacts dot eelis.net
@ 2014-11-16 19:03 ` owner at bugs dot debian.org
2014-12-24 14:18 ` gcc-bugzilla at contacts dot eelis.net
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: owner at bugs dot debian.org @ 2014-11-16 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086
--- Comment #12 from owner at bugs dot debian.org ---
Thank you for the additional information you have supplied regarding
this Bug report.
This is an automatically generated reply to let you know your message
has been received.
Your message has not been forwarded to the package maintainers or
other interested parties; you should ensure that the developers are
aware of the problem you have entered into the system - preferably
quoting the Bug reference number, #85535.
If you wish to submit further information on this problem, please
send it to 85535-quiet@bugs.debian.org.
Please do not send mail to owner@bugs.debian.org unless you wish
to report a problem with the Bug-tracking system.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/12086] memcmp(i,j,4) should use word (SI) subtraction
[not found] <bug-12086-4@http.gcc.gnu.org/bugzilla/>
2014-11-16 18:53 ` gcc-bugzilla at contacts dot eelis.net
2014-11-16 19:03 ` owner at bugs dot debian.org
@ 2014-12-24 14:18 ` gcc-bugzilla at contacts dot eelis.net
2014-12-24 14:27 ` owner at bugs dot debian.org
2020-08-13 19:36 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 8+ messages in thread
From: gcc-bugzilla at contacts dot eelis.net @ 2014-12-24 14:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086
--- Comment #13 from Eelis <gcc-bugzilla at contacts dot eelis.net> ---
It's also worth noting that this affects operator== for std::array. :(
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/12086] memcmp(i,j,4) should use word (SI) subtraction
[not found] <bug-12086-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2014-12-24 14:18 ` gcc-bugzilla at contacts dot eelis.net
@ 2014-12-24 14:27 ` owner at bugs dot debian.org
2020-08-13 19:36 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 8+ messages in thread
From: owner at bugs dot debian.org @ 2014-12-24 14:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086
--- Comment #14 from owner at bugs dot debian.org ---
Thank you for the additional information you have supplied regarding
this Bug report.
This is an automatically generated reply to let you know your message
has been received.
Your message has not been forwarded to the package maintainers or
other interested parties; you should ensure that the developers are
aware of the problem you have entered into the system - preferably
quoting the Bug reference number, #85535.
If you wish to submit further information on this problem, please
send it to 85535-quiet@bugs.debian.org.
Please do not send mail to owner@bugs.debian.org unless you wish
to report a problem with the Bug-tracking system.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/12086] memcmp(i,j,4) should use word (SI) subtraction
[not found] <bug-12086-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2014-12-24 14:27 ` owner at bugs dot debian.org
@ 2020-08-13 19:36 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-08-13 19:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gabravier at gmail dot com
--- Comment #17 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 96603 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread