public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Amnon Cohen <amnon_cohen@yahoo.com>
To: ebotcazou@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: optimization/9319: slower code generated for simple loop on linux
Date: Thu, 16 Jan 2003 13:36:00 -0000	[thread overview]
Message-ID: <20030116133605.23277.qmail@sources.redhat.com> (raw)

The following reply was made to PR optimization/9319; it has been noted by GNATS.

From: Amnon Cohen <amnon_cohen@yahoo.com>
To: ebotcazou@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
  nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc: amnon@verisity.com
Subject: Re: optimization/9319: slower code generated for simple loop on linux
Date: Thu, 16 Jan 2003 05:30:27 -0800 (PST)

 --0-462841879-1042723827=:65194
 Content-Type: text/plain; charset=us-ascii
 Content-Id: 
 Content-Disposition: inline
 
 Hi ebotcazou,
 Thanks for getting back to me so fast.
 I have done a few more tests, and it seems 
 that this is a regression
 on all platforms  (not just intel) introduced by
 gcc3.1
 Note that the while loop in the example is equivalent
 to
 for (i=0; i<n; i++) s+=i;
 
 The for loop generates faster code.
 
 Another problem, if we compile with
 -funroll-all-loops,
 the loop does not get unrolled on gcc3.2.1, whereas
 it does on gcc3.0
 
 
 Here is the information you asked for.
 For the newer compiler which shows the regression
 
 >gcc321 -v
 Reading specs from
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/specs
 Configured with: ./configure 
 Thread model: posix
 gcc version 3.2.1
 
 Wheras the old version
 >gcc3 -v
 Reading specs from
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/specs
 Configured with: ./configure 
 Thread model: single
 gcc version 3.0.3
 
 I have attached the assembler files 
 (produced by gcc -S loop3.c)
 
 The performance is significantly reduced on intel
 linux and on Solaris (I have not sent solaris asm
 files, let me know if you need them). So I do 
 not think that this is architecture related
 
 Please let me know if you need any more info!
 
 - Amnon
 
 --- ebotcazou@gcc.gnu.org wrote:
 > Synopsis: slower code generated for simple loop on
 > linux
 > 
 > Responsible-Changed-From-To: unassigned->ebotcazou
 > Responsible-Changed-By: ebotcazou
 > Responsible-Changed-When: Thu Jan 16 03:58:11 2003
 > Responsible-Changed-Why:
 >     Investigating.
 > State-Changed-From-To: open->feedback
 > State-Changed-By: ebotcazou
 > State-Changed-When: Thu Jan 16 03:58:11 2003
 > State-Changed-Why:
 >     Could you provide us with more details ? What
 > does gcc -v output for each compiler ? Could you
 > post the assembly code generated for the loop by
 > each compiler (gcc -O3 -S) ? On what hardware did
 > you experience the performance hit ?
 > 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9319
 
 __________________________________________________
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com
 --0-462841879-1042723827=:65194
 Content-Type: application/octet-stream; name="loop3.linux.gcc3.s"
 Content-Transfer-Encoding: base64
 Content-Description: loop3.linux.gcc3.s
 Content-Disposition: attachment; filename="loop3.linux.gcc3.s"
 
 CS5maWxlCSJsb29wMy5jIgoJLnRleHQKCS5hbGlnbiAxNgouZ2xvYmwgbG9v
 cDMKCS50eXBlCWxvb3AzLEBmdW5jdGlvbgpsb29wMzoKCXB1c2hsCSVlYnAK
 CXhvcmwJJWVheCwgJWVheAoJbW92bAklZXNwLCAlZWJwCgltb3ZsCTgoJWVi
 cCksICVlY3gKCXhvcmwJJWVkeCwgJWVkeAoJY21wbAklZWN4LCAlZWF4Cglq
 Z2UJLkw4CgkucDJhbGlnbiA0Ci5MNToKCWFkZGwJJWVkeCwgJWVheAoJaW5j
 bAklZWR4CgljbXBsCSVlY3gsICVlZHgKCWpsCS5MNQouTDg6Cglwb3BsCSVl
 YnAKCXJldAouTGZlMToKCS5zaXplCWxvb3AzLC5MZmUxLWxvb3AzCgkuaWRl
 bnQJIkdDQzogKEdOVSkgMy4wLjMiCg==
 
 --0-462841879-1042723827=:65194
 Content-Type: application/octet-stream; name="loop3.linux.gcc321.s"
 Content-Transfer-Encoding: base64
 Content-Description: loop3.linux.gcc321.s
 Content-Disposition: attachment; filename="loop3.linux.gcc321.s"
 
 CS5maWxlCSJsb29wMy5jIgoJLnRleHQKCS5wMmFsaWduIDQsLDE1Ci5nbG9i
 bCBsb29wMwoJLnR5cGUJbG9vcDMsQGZ1bmN0aW9uCmxvb3AzOgoJcHVzaGwJ
 JWVicAoJeG9ybAklZWR4LCAlZWR4Cgltb3ZsCSVlc3AsICVlYnAKCW1vdmwJ
 OCglZWJwKSwgJWVjeAoJeG9ybAklZWF4LCAlZWF4CgkucDJhbGlnbiA0LCwx
 NQouTDc6CgljbXBsCSVlY3gsICVlZHgKCWpnZQkuTDMKCWFkZGwJJWVkeCwg
 JWVheAoJaW5jbAklZWR4CglqbXAJLkw3Ci5MMzoKCXBvcGwJJWVicAoJcmV0
 Ci5MZmUxOgoJLnNpemUJbG9vcDMsLkxmZTEtbG9vcDMKCS5pZGVudAkiR0ND
 OiAoR05VKSAzLjIuMSIK
 
 --0-462841879-1042723827=:65194--


             reply	other threads:[~2003-01-16 13:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-16 13:36 Amnon Cohen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-04-16  7:09 ebotcazou
2003-01-22  2:06 Richard Henderson
2003-01-21 23:16 Eric Botcazou
2003-01-17  9:35 ebotcazou
2003-01-17  3:36 Richard Henderson
2003-01-16 19:16 Eric Botcazou
2003-01-16 11:58 ebotcazou
2003-01-15 10:16 amnon_cohen

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=20030116133605.23277.qmail@sources.redhat.com \
    --to=amnon_cohen@yahoo.com \
    --cc=ebotcazou@gcc.gnu.org \
    --cc=gcc-prs@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).