public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/19923] [4.0/4.1 Regression] openssl is slower when compiled with gcc 4.0 than 3.3 Date: Thu, 17 Nov 2005 15:09:00 -0000 [thread overview] Message-ID: <20051117150918.6483.qmail@sourceware.org> (raw) In-Reply-To: <bug-19923-6145@http.gcc.gnu.org/bugzilla/> ------- Comment #35 from rakdver at gcc dot gnu dot org 2005-11-17 15:09 ------- Created an attachment (id=10263) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10263&action=view) Patch After some playing with fold, I arrived to the following patch, that almost works. With the patch, the code for the loop is <L0>:; MEM[base: ptr]{*ptr} = cleanse_ctr; ptr = ptr + 1B; cleanse_ctr = (unsigned char) (((signed char) ptr & 15) + (signed char) cleanse_ctr + 17); len = len - 1; if (len != 0) goto <L0>; else goto <L2>; Which seems just fine. The assembler is .L3: movb (%edi), %al movb %al, (%ecx) incl %ecx movb %cl, %al andl $15, %eax movb (%edi), %dl addl $17, %edx addl %edx, %eax movb %al, (%edi) decl %esi jne .L3 Which also seems OK to me. However, the "ugly" version we produce without the patch: .L4: movb (%edi), %al movb %al, (%ecx) incl %ecx movb -16(%ebp), %al addl %esi, %eax andl $15, %eax movb (%edi), %dl addl $17, %edx addl %edx, %eax movb %al, (%edi) incl %esi cmpl 12(%ebp), %esi jne .L4 Is faster by 30%, from reasons I just don't understand :-( -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19923
next prev parent reply other threads:[~2005-11-17 15:09 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/> 2005-10-27 0:47 ` pinskia at gcc dot gnu dot org 2005-10-31 2:39 ` mmitchel at gcc dot gnu dot org 2005-11-16 9:42 ` steven at gcc dot gnu dot org 2005-11-17 13:35 ` rakdver at gcc dot gnu dot org 2005-11-17 15:09 ` rakdver at gcc dot gnu dot org [this message] 2006-02-24 0:26 ` [Bug target/19923] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org 2006-05-25 2:33 ` mmitchel at gcc dot gnu dot org 2006-08-27 21:08 ` pinskia at gcc dot gnu dot org 2007-02-14 9:05 ` [Bug target/19923] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org 2007-07-04 21:54 ` pinskia at gcc dot gnu dot org 2007-11-19 10:04 ` steven at gcc dot gnu dot org 2007-11-19 12:28 ` dank at kegel dot com 2007-11-28 17:19 ` dsh at gcc dot gnu dot org 2007-11-28 18:01 ` dank at kegel dot com 2008-01-25 21:01 ` rguenth at gcc dot gnu dot org 2008-01-26 14:09 ` [Bug target/19923] [4.0/4.1/4.2 " rguenth at gcc dot gnu dot org 2005-02-12 20:07 [Bug c/19923] New: " gj at pointblue dot com dot pl 2005-06-08 13:15 ` [Bug target/19923] [4.0/4.1 Regression] " giovannibajo at libero dot it 2005-06-17 0:59 ` dank at kegel dot com 2005-06-17 1:11 ` pinskia at gcc dot gnu dot org 2005-06-18 6:24 ` dank at kegel dot com 2005-06-18 6:39 ` dank at kegel dot com 2005-06-18 17:47 ` dank at kegel dot com 2005-06-18 22:46 ` dank at kegel dot com 2005-06-24 15:00 ` dank at kegel dot com 2005-06-24 15:01 ` dank at kegel dot com 2005-06-24 15:53 ` steven at gcc dot gnu dot org 2005-06-24 16:24 ` rakdver at atrey dot karlin dot mff dot cuni dot cz 2005-06-24 17:41 ` dann at godzilla dot ics dot uci dot edu 2005-06-25 2:49 ` rakdver at gcc dot gnu dot org 2005-06-25 10:15 ` steven at gcc dot gnu dot org 2005-06-25 11:32 ` rakdver at atrey dot karlin dot mff dot cuni dot cz 2005-09-27 15:57 ` mmitchel at gcc dot gnu dot 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=20051117150918.6483.qmail@sourceware.org \ --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: linkBe 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).