public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/47000] Major performance regression in parallel SSE2 impl of SHA256 hash algorithm
Date: Sat, 18 Dec 2010 15:41:00 -0000	[thread overview]
Message-ID: <bug-47000-4-WKKz89Atx9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47000-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2010-12-18 15:40:38 UTC ---
(In reply to comment #5)
> (In reply to comment #3)
> > Compiled like so:
> > $ gcc-4.4.2 -S -O2 sha256_4way.i -o sha256_4way-44.s
> > $ gcc-4.5.0 -S -O2 sha256_4way.i -o sha256_4way-45.s
> > 
> > $ grep -c call *.s
> > sha256_4way-44.s:0
> > sha256_4way-45.s:484
> > $ grep call *.s|head
> > sha256_4way-45.s:    call    ROTR
> > sha256_4way-45.s:    call    ROTR
> > sha256_4way-45.s:    call    ROTR
> > sha256_4way-45.s:    call    ROTR
> > sha256_4way-45.s:    call    ROTR
> > sha256_4way-45.s:    call    ROTR
> > sha256_4way-45.s:    call    ROTR
> > sha256_4way-45.s:    call    ROTR
> > sha256_4way-45.s:    call    ROTR
> > sha256_4way-45.s:    call    ROTR
> > $ 
> > 
> > ROTR should have been inlined:
> > 
> > static inline __m128i ROTR(__m128i x, const int n) {
> >     return _mm_srli_epi32(x, n) | _mm_slli_epi32(x, 32 - n);
> > }
> > 
> > This probably explains the slowdown.
> 
> This is caused by revision 151511:
> 
> http://gcc.gnu.org/ml/gcc-cvs/2009-09/msg00257.html

It is fixed by revision 166517:

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00405.html


  parent reply	other threads:[~2010-12-18 15:41 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-18  7:46 [Bug c/47000] New: " jgarzik at pobox dot com
2010-12-18  7:48 ` [Bug c/47000] " jgarzik at pobox dot com
2010-12-18 12:27 ` [Bug target/47000] " steven at gcc dot gnu.org
2010-12-18 12:39 ` steven at gcc dot gnu.org
2010-12-18 12:49 ` steven at gcc dot gnu.org
2010-12-18 15:36 ` hjl.tools at gmail dot com
2010-12-18 15:41 ` hjl.tools at gmail dot com [this message]
2010-12-18 15:43 ` hjl.tools at gmail dot com
2010-12-18 16:04 ` hjl.tools at gmail dot com
2010-12-18 18:24 ` jgarzik at pobox dot com
2010-12-18 18:49 ` jgarzik at pobox dot com
2010-12-18 19:08 ` jgarzik at pobox dot com
2010-12-18 19:09 ` jgarzik at pobox dot com
2010-12-18 19:21 ` steven at gcc dot gnu.org
2010-12-18 19:35 ` [Bug target/47000] [4.5 Regression] Failure to inline SSE intrinsics hjl.tools at gmail dot com
2010-12-18 19:39 ` hjl.tools at gmail dot com
2010-12-18 20:26 ` jakub at gcc dot gnu.org
2010-12-18 21:15 ` jgarzik at pobox dot com
2010-12-18 21:16 ` jgarzik at pobox dot com
2010-12-18 21:17 ` jgarzik at pobox dot com
2010-12-18 21:26 ` jgarzik at pobox dot com
2010-12-19 11:50 ` hubicka at ucw dot cz
2010-12-19 11:53 ` hubicka at gcc dot gnu.org
2010-12-19 11:58 ` hubicka at gcc dot gnu.org
2010-12-20  8:32 ` jakub at gcc dot gnu.org
2010-12-21 10:31 ` hubicka at gcc dot gnu.org
2010-12-21 10:39 ` hubicka at gcc dot gnu.org
2010-12-28 14:57 ` rguenth at gcc dot gnu.org
2011-03-08 13:20 ` rguenth at gcc dot gnu.org
2011-04-28 15:28 ` rguenth at gcc dot gnu.org
2012-07-02 10:28 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47000-4-WKKz89Atx9@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).