public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/19923] [4.0/4.1 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [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
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-27  0:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #31 from pinskia at gcc dot gnu dot org  2005-10-27 00:47 -------
(In reply to comment #30)
> This patch could help; I need to benchmark it before submitting it.

Any news about this patch?


-- 


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


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

* [Bug target/19923] [4.0/4.1 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
  2005-10-27  0:47 ` [Bug target/19923] [4.0/4.1 Regression] openssl is slower when compiled with gcc 4.0 than 3.3 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
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31  2:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #32 from mmitchel at gcc dot gnu dot org  2005-10-31 02:39 -------
Leaving as P2 as this is a significant pessimization on a significant piece of
code on relatively common processors.


-- 


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


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

* [Bug target/19923] [4.0/4.1 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
  2005-10-27  0:47 ` [Bug target/19923] [4.0/4.1 Regression] openssl is slower when compiled with gcc 4.0 than 3.3 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
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-11-16  9:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #33 from steven at gcc dot gnu dot org  2005-11-16 09:42 -------
Zdenek, any news about your patch from comment #30?


-- 


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


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

* [Bug target/19923] [4.0/4.1 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  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
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2005-11-17 13:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #34 from rakdver at gcc dot gnu dot org  2005-11-17 13:35 -------
It behaves somewhat erratically on SPEC2000 (it increases the overall score,
but there are some significant regressions).  And, it also causes us to produce
worse code for this testcase at the moment, due to a missunderstanding between
ivopts and fold; expression 

(unsigned char) (signed char) (int) (ptr + 1B) - (unsigned char) ptr

is produced, and it is not folded to 1.


-- 


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


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

* [Bug target/19923] [4.0/4.1 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2005-11-17 13:35 ` rakdver at gcc dot gnu dot org
@ 2005-11-17 15:09 ` rakdver at gcc dot gnu dot org
  2006-02-24  0:26 ` [Bug target/19923] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2005-11-17 15:09 UTC (permalink / raw)
  To: gcc-bugs



------- 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


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

* [Bug target/19923] [4.0/4.1/4.2 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2005-11-17 15:09 ` rakdver at gcc dot gnu dot org
@ 2006-02-24  0:26 ` mmitchel at gcc dot gnu dot org
  2006-05-25  2:33 ` mmitchel at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-24  0:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #36 from mmitchel at gcc dot gnu dot org  2006-02-24 00:25 -------
This issue will not be resolved in GCC 4.1.0; retargeted at GCC 4.1.1.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.3                       |4.1.1


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


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

* [Bug target/19923] [4.0/4.1/4.2 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-25  2:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #37 from mmitchel at gcc dot gnu dot org  2006-05-25 02:32 -------
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.1                       |4.1.2


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


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

* [Bug target/19923] [4.0/4.1/4.2 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-27 21:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #38 from pinskia at gcc dot gnu dot org  2006-08-27 21:07 -------
For the reduced testcase in comment #12, we get:
.L2:
        movl    8(%ebp), %edx
        movl    -4(%edx,%ecx,4), %eax
        movl    %eax, (%esi)
        movl    16(%ebp), %edi
        movzbl  -1(%ecx,%edi), %edx
        movl    %edx, 64(%esi)
        xorl    %edx, %eax
        movl    %eax, 128(%esi)
        movl    12(%ebp), %edi
        movl    -4(%edi,%ecx,4), %eax
        xorl    -16(%ebp), %edx
        xorl    S@GOTOFF(%ebx,%edx,4), %eax
        movl    %eax, -4(%edi,%ecx,4)
        movl    %eax, -16(%ebp)
        addl    $1, %ecx
        addl    $4, %esi
        cmpl    $17, %ecx
        jne     .L2


Does someone know if this ok produced code or not, I never a good reader of x86
code?


-- 


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


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

* [Bug target/19923] [4.0/4.1/4.2/4.3 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2006-08-27 21:08 ` pinskia at gcc dot gnu dot org
@ 2007-02-14  9:05 ` mmitchel at gcc dot gnu dot org
  2007-07-04 21:54 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:05 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


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


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

* [Bug target/19923] [4.0/4.1/4.2/4.3 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-04 21:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #39 from pinskia at gcc dot gnu dot org  2007-07-04 21:53 -------
I think this has been imrpvoed for 4.3, it would be nice if someone did some
timings for 4.3.


-- 


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


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

* [Bug target/19923] [4.0/4.1/4.2/4.3 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-11-19 10:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #40 from steven at gcc dot gnu dot org  2007-11-19 10:04 -------
Can someone please redo the timings for GCC 4.3?


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


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


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

* [Bug target/19923] [4.0/4.1/4.2/4.3 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: dank at kegel dot com @ 2007-11-19 12:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #41 from dank at kegel dot com  2007-11-19 12:27 -------
OK, I'll see if I can get that done.


-- 


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


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

* [Bug target/19923] [4.0/4.1/4.2/4.3 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: dsh at gcc dot gnu dot org @ 2007-11-28 17:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #42 from dsh at gcc dot gnu dot org  2007-11-28 17:19 -------
Created an attachment (id=14656)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14656&action=view)
Benchmarks

I ran the benchmarks for the minimal testcase (using Dan Kegel's script) on a
Core 2 Duo, AMD Dual Core Opteron, and a Pentium 3 using GCC 2.95.3, 3.4.3,
4.0.1, and 4.3.0 from svn.  I'm still looking for a Pentium 4 to test on.


-- 


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


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

* [Bug target/19923] [4.0/4.1/4.2/4.3 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  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
  15 siblings, 0 replies; 16+ messages in thread
From: dank at kegel dot com @ 2007-11-28 18:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #43 from dank at kegel dot com  2007-11-28 18:01 -------
Of the results posted above, the only interesting one that is still slower 
than gcc-2.95 is a pentium 3 with -fPIC.
(Happily, gcc-4.3 is an improvement there, but it's still worse than 2.95.)
Oddly, this one does better with athlon-xp tuning.

/proc/cpuinfo info                                       pic?   tune           
[t_34/t_295, t_401/t_295, t_43/t_295]
cpu family 6,model 11, Intel(R) Pentium(R) III CPU - S 1266MHz, -fPIC
tune=pentium3   [1.37, 1.72, 1.20]

cpu family 6,model 11, Intel(R) Pentium(R) III CPU - S 1266MHz, -fPIC
tune=athlon-xp [2.16, 2.49, 1.10]

I'm not sure how important Pentium III performance is anymore.


-- 


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


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

* [Bug target/19923] [4.0/4.1/4.2/4.3 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  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
  15 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-25 21:01 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
   Last reconfirmed|2005-06-01 22:55:36         |2008-01-25 20:57:23
               date|                            |


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


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

* [Bug target/19923] [4.0/4.1/4.2 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
       [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2008-01-25 21:01 ` rguenth at gcc dot gnu dot org
@ 2008-01-26 14:09 ` rguenth at gcc dot gnu dot org
  15 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-26 14:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #44 from rguenth at gcc dot gnu dot org  2008-01-26 13:46 -------
Fixed for 4.3.  WONTFIX for the branches.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
            Summary|[4.0/4.1/4.2/4.3 Regression]|[4.0/4.1/4.2 Regression]
                   |openssl is slower when      |openssl is slower when
                   |compiled with gcc 4.0 than  |compiled with gcc 4.0 than
                   |3.3                         |3.3
   Target Milestone|4.1.3                       |4.3.0


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


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

end of thread, other threads:[~2008-01-26 13:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19923-6145@http.gcc.gnu.org/bugzilla/>
2005-10-27  0:47 ` [Bug target/19923] [4.0/4.1 Regression] openssl is slower when compiled with gcc 4.0 than 3.3 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
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

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).