public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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 ` [Bug middle-end/12086] memcmp(i,j,4) should use word (SI) subtraction 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 ` [Bug middle-end/12086] memcmp(i,j,4) should use word (SI) subtraction 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

* [Bug middle-end/12086] memcmp(i,j,4) should use word (SI) subtraction
       [not found] <bug-12086-6528@http.gcc.gnu.org/bugzilla/>
  2005-10-22 23:59 ` pinskia at gcc dot gnu dot org
  2006-08-21  6:12 ` pinskia at gcc dot gnu dot org
@ 2007-05-28 21:07 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-28 21:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2007-05-28 21:07 -------
I am no longer working on this.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pinskia at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086


^ 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-6528@http.gcc.gnu.org/bugzilla/>
  2005-10-22 23:59 ` pinskia at gcc dot gnu dot org
@ 2006-08-21  6:12 ` pinskia at gcc dot gnu dot org
  2007-05-28 21:07 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-21  6:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2006-08-21 06:12 -------
I am going to fix up my patch for 4.3.0.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-01-20 01:00:10         |2006-08-21 06:12:17
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086


^ 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-6528@http.gcc.gnu.org/bugzilla/>
@ 2005-10-22 23:59 ` pinskia at gcc dot gnu dot org
  2006-08-21  6:12 ` pinskia at gcc dot gnu dot org
  2007-05-28 21:07 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-22 23:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2005-10-22 23:59 -------
I don't have time to work on this any more.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pinskia at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-08-13 19:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-12086-4@http.gcc.gnu.org/bugzilla/>
2014-11-16 18:53 ` [Bug middle-end/12086] memcmp(i,j,4) should use word (SI) subtraction 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
     [not found] <bug-12086-6528@http.gcc.gnu.org/bugzilla/>
2005-10-22 23:59 ` pinskia at gcc dot gnu dot org
2006-08-21  6:12 ` pinskia at gcc dot gnu dot org
2007-05-28 21:07 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).