This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/6883: Fails to optimize temporary objects.


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

From: Richard Guenther <rguenth@tat.physik.uni-tuebingen.de>
To: Dara Hazeghi <dhazeghi@yahoo.com>
Cc: gcc-gnats@gcc.gnu.org,  <rguenth@tat.physik.uni-tuebingen.de>
Subject: Re: optimization/6883: Fails to optimize temporary objects.
Date: Sun, 11 May 2003 14:00:37 +0200 (CEST)

 On Sat, 10 May 2003, Dara Hazeghi wrote:
 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-
 > trail&database=gcc&pr=6883
 >
 > Hello,
 >
 > this bug was reported against gcc 3.1. Would it be possible to test
 > your testcase against a more current version of gcc (ie 3.2.3 or 3.3
 > prerelease) and report back on the results? Thanks,
 
 Some more information, based on my last reply - the Intel compiler
 Intel(R) C++ Compiler for 32-bit applications, Version 7.1   Build
 20030424Z produces with -O2
 
 iterators with temporaries
 
 ..B1.18:                        # Preds ..B1.18 ..B1.17
         lea       1(%esi), %edi                                 #65.24
         cmpl      $254, %edi                                    #66.16
         fldl      -8(%edx,%esi,8)                               #65.21
         faddl     8(%edx,%esi,8)                                #65.28
         fmull     (%eax,%esi,8)                                 #65.32
         fstpl     (%ecx,%esi,8)                                 #65.9
         movl      %edi, %esi                                    #65.24
         jle       ..B1.18       # Prob 97%                      #66.16
 
 iterators without temporaries
 
 ..B1.21:                        # Preds ..B1.21 ..B1.20         # Infreq
         fldl      -8(%edx,%esi,8)                               #74.17
         faddl     8(%edx,%esi,8)                                #74.25
         fmull     (%eax,%esi,8)                                 #74.34
         fstpl     (%ecx,%esi,8)                                 #74.9
         incl      %esi                                          #75.16
         cmpl      $254, %esi                                    #75.16
         jle       ..B1.21       # Prob 97%                      #75.16
 
 no iterators, just int
 
 ..B1.24:                        # Preds ..B1.24 ..B1.23         # Infreq
         lea       1(%edi), %esi                                 #83.24
         fldl      -8(%eax,%edi,8)                               #83.17
         faddl     8(%eax,%edi,8)                                #83.24
         fmull     (%edx,%edi,8)                                 #83.32
         fstpl     (%ecx,%edi,8)                                 #83.9
         addl      $2, %edi                                      #83.24
         cmpl      $254, %edi                                    #84.16
         fldl      -8(%eax,%esi,8)                               #83.17
         faddl     8(%eax,%esi,8)                                #83.24
         fmull     (%edx,%esi,8)                                 #83.32
         fstpl     (%ecx,%esi,8)                                 #83.9
         jle       ..B1.24       # Prob 97%                      #84.16
 
 it even detects the loop is run even times and unrolls it 2-times ;)
 This is what I like the code to get optimized to, at least all three
 versions look nearly the same.
 
 Richard.
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]