public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/18463] New: [4.0 Regression] Moving floating point through an integer register
@ 2004-11-13 17:09 steven at gcc dot gnu dot org
  2004-11-13 17:23 ` [Bug tree-optimization/18463] " pinskia at gcc dot gnu dot org
                   ` (30 more replies)
  0 siblings, 31 replies; 34+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-11-13 17:09 UTC (permalink / raw)
  To: gcc-bugs

The item "Moving floating point through integer registers" 
on http://gcc.gnu.org/projects/optimize.html shows how GCC 
can move a float array element via an integer register. 
 
Consider the following test case: 
 
void 
fcpy(float *restrict a,  float *restrict b, 
     float *restrict aa, float *restrict bb, int n) 
{ 
        int i; 
        for(i = 0; i < n; i++) { 
                aa[i]=a[i]; 
                bb[i]=b[i]; 
        } 
} 
 
GCC 3.3 produces the following code for the inner loop for 
-O2 -fomit-frame-pointer -fschedule-insns --std=c99: 
 
.L6: 
        movl    (%ebp,%ecx,4), %eax 
        movl    (%edi,%ecx,4), %edx 
        movl    %eax, (%esi,%ecx,4) 
        movl    %edx, (%ebx,%ecx,4) 
        incl    %ecx 
        cmpl    36(%esp), %ecx 
        jl      .L6 
 
GCC 4.0 (4.0.0 20041112) produces this piece of junk: 
 
.L4: 
        movl    20(%esp), %eax 
        leal    0(,%ebx,4), %edx 
        cmpl    %ebx, %ebp 
        movl    -4(%eax,%edx), %ecx 
        leal    1(%ebx), %eax 
        movl    %eax, %ebx 
        movl    %ecx, -4(%edi,%edx) 
        movl    24(%esp), %ecx 
        movl    -4(%edx,%ecx), %eax 
        movl    %eax, -4(%edx,%esi) 
        jg      .L4 
 
This is a bad regression from at least gcc 2.95 and gcc 3.1, 
as demonstraded on the projects/optimize.html page.

-- 
           Summary: [4.0 Regression] Moving floating point through an
                    integer register
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,jh at suse dot cz,zack
                    at codesourcery dot com


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


^ permalink raw reply	[flat|nested] 34+ messages in thread
[parent not found: <bug-18463-280@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2007-01-18  3:10 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-13 17:09 [Bug middle-end/18463] New: [4.0 Regression] Moving floating point through an integer register steven at gcc dot gnu dot org
2004-11-13 17:23 ` [Bug tree-optimization/18463] " pinskia at gcc dot gnu dot org
2004-11-13 17:42 ` pinskia at gcc dot gnu dot org
2004-11-13 17:52 ` steven at gcc dot gnu dot org
2004-11-13 17:54 ` pinskia at gcc dot gnu dot org
2004-11-13 18:14 ` pinskia at gcc dot gnu dot org
2004-11-13 18:46 ` [Bug rtl-optimization/18463] " pinskia at gcc dot gnu dot org
2004-11-13 19:35 ` steven at gcc dot gnu dot org
2004-11-25 23:10 ` cvs-commit at gcc dot gnu dot org
2004-11-25 23:29 ` [Bug tree-optimization/18463] " pinskia at gcc dot gnu dot org
2004-11-25 23:55 ` pinskia at gcc dot gnu dot org
2004-11-26  5:11 ` pinskia at gcc dot gnu dot org
2004-11-26  8:12 ` rakdver at gcc dot gnu dot org
2004-11-28 22:56 ` rakdver at gcc dot gnu dot org
2004-11-28 23:39 ` giovannibajo at libero dot it
2004-12-05  4:29 ` pinskia at gcc dot gnu dot org
2005-01-29  2:34 ` steven at gcc dot gnu dot org
2005-01-29  2:37 ` [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes steven at gcc dot gnu dot org
2005-01-29  3:16 ` tbptbp at gmail dot com
2005-04-21  5:00 ` [Bug tree-optimization/18463] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-04-21  7:58 ` rakdver at gcc dot gnu dot org
2005-06-13 12:46 ` pinskia at gcc dot gnu dot org
2005-06-13 13:40 ` jh at suse dot cz
2005-07-08  1:38 ` mmitchel at gcc dot gnu dot org
2005-09-13 18:52 ` [Bug tree-optimization/18463] [4.0 " pinskia at gcc dot gnu dot org
2005-09-14  8:21 ` steven at gcc dot gnu dot org
2005-09-14 11:04 ` rakdver at gcc dot gnu dot org
2005-09-14 12:22 ` rguenth at gcc dot gnu dot org
2005-09-14 12:41 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-09-19 15:20 ` rakdver at gcc dot gnu dot org
2005-09-20  7:09 ` cvs-commit at gcc dot gnu dot org
2005-09-27 16:22 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-18463-280@http.gcc.gnu.org/bugzilla/>
2006-03-11  3:17 ` mmitchel at gcc dot gnu dot org
2007-01-18  3:10 ` gdr 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).