public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
       [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
  1 sibling, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-03-11  3:17 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
       [not found] <bug-18463-280@http.gcc.gnu.org/bugzilla/>
  2006-03-11  3:17 ` [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes mmitchel at gcc dot gnu dot org
@ 2007-01-18  3:10 ` gdr at gcc dot gnu dot org
  1 sibling, 0 replies; 12+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-01-18  3:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #30 from gdr at gcc dot gnu dot org  2007-01-18 03:09 -------
Fixed in GCC-4.1.0.
Not to be fixed in GCC-4.0.x


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.0.4                       |4.1.0


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
  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
                   ` (8 preceding siblings ...)
  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
  9 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:22 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
  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
                   ` (7 preceding siblings ...)
  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
  9 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-20  7:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-20 07:09 -------
Subject: Bug 18463

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rakdver@gcc.gnu.org	2005-09-20 07:09:22

Modified files:
	gcc            : ChangeLog tree-chrec.c tree-chrec.h 
	                 tree-scalar-evolution.c 

Log message:
	PR tree-optimization/18463
	* tree-chrec.c (chrec_convert): Return fold_converted chrec if
	converting it directly is not possible.
	(chrec_convert_aggressive): New function.
	* tree-chrec.h (chrec_convert_aggressive): Declare.
	* tree-scalar-evolution.c (instantiate_parameters_1, resolve_mixers):
	Fold chrec conversions aggressively if asked to.
	(instantiate_parameters): Modified because of changes in
	instantiate_parameters_1.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9985&r2=2.9986
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-chrec.c.diff?cvsroot=gcc&r1=2.27&r2=2.28
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-chrec.h.diff?cvsroot=gcc&r1=2.10&r2=2.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-scalar-evolution.c.diff?cvsroot=gcc&r1=2.37&r2=2.38



-- 


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
  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
                   ` (6 preceding siblings ...)
  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
  9 siblings, 0 replies; 12+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2005-09-19 15:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rakdver at gcc dot gnu dot org  2005-09-19 15:19 -------
Another patch that improves the code on i686:  
  
http://gcc.gnu.org/ml/gcc-patches/2005-09/msg01159.html 
 
(with -O2 -fomit-frame-pointer:) 
 
.L4: 
        movl    (%ebp,%edx,4), %eax 
        movl    %eax, (%esi,%edx,4) 
        movl    (%edi,%edx,4), %eax 
        movl    %eax, (%ebx,%edx,4) 
        incl    %edx 
        cmpl    %edx, %ecx 
        jne     .L4 
 

-- 


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
  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
                   ` (5 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: rakdver at atrey dot karlin dot mff dot cuni dot cz @ 2005-09-14 12:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz  2005-09-14 12:41 -------
Subject: Re:  [4.0 Regression] suboptimal use of fancy x86 addressing modes

> It looks like it is just following existing practice?

yes, I know.  The practice is just wrong, though.


-- 


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
  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
                   ` (4 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-14 12:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rguenth at gcc dot gnu dot org  2005-09-14 12:22 -------
It looks like it is just following existing practice?

-- 


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
  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
                   ` (3 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2005-09-14 11:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rakdver at gcc dot gnu dot org  2005-09-14 11:04 -------
Auch; that patch is actually a very bad idea.  Pretending that complex
addressing modes are cheaper, when they are not, is just confusing.  If there
are optimizers that indeed want to prefer complex addressing modes (like cse and
combine, I suppose), they should reflect that in the cost function they are
using, rather than forcing this missconception to every other optimizer.

-- 


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
  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
                   ` (2 preceding siblings ...)
  2005-09-13 18:52 ` 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
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-09-14  8:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-09-14 08:21 -------
(From update of attachment 7541)
Already in mainline


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #7541 is|0                           |1
           obsolete|                            |


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
  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
  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-09-13 18:52 ` pinskia at gcc dot gnu dot org
  2005-09-14  8:21 ` steven at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-13 18:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-13 18:51 -------
This is what we get one the mainline:
.L4:
        movl    (%ecx), %eax
        addl    $4, %ecx
        movl    %eax, (%edi,%edx,4)
        movl    (%ebp,%edx,4), %eax
        movl    %eax, (%esi,%edx,4)
        incl    %edx
        cmpl    %edx, %ebx
        jne     .L4

Note the code in comment #4  has a target patch which improves this a little further:
Index: i386.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.858
diff -u -p -r1.858 i386.c
--- i386.c      6 Sep 2005 19:57:46 -0000       1.858
+++ i386.c      13 Sep 2005 18:49:44 -0000
@@ -5273,6 +5273,10 @@ ix86_address_cost (rtx x)
   /* More complex memory references are better.  */
   if (parts.disp && parts.disp != const0_rtx)
     cost--;
+
+  if (parts.scale != 1)
+    cost--;
+
   if (parts.seg != SEG_DEFAULT)
     cost--;
 

But since I don't have SPEC, I have not submitted the patch.  Steven could you test this patch and 
submit it for me?

ChangeLog (please make a better changelog): 
(ix86_address_cost): More complex is cheaper than anything else.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1 Regression]        |[4.0 Regression] suboptimal
                   |suboptimal use of fancy x86 |use of fancy x86 addressing
                   |addressing modes            |modes


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
  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
  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-09-13 18:52 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: tbptbp at gmail dot com @ 2005-01-29  3:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tbptbp at gmail dot com  2005-01-29 03:15 -------
Some recent discussion about related symptoms.

http://gcc.gnu.org/ml/gcc/2005-01/msg01667.html

-- 


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


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

* [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes
  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
@ 2005-01-29  2:37 ` steven at gcc dot gnu dot org
  2005-01-29  3:16 ` tbptbp at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-29  2:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-29 02:37 -------
This problem is bigger than just the int<-->fp problem of the original 
bug report.  It's basically the same problem, namely a poor choice of 
addressing modes. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0 Regression] Moving     |[4.0 Regression] suboptimal
                   |floating point through an   |use of fancy x86 addressing
                   |integer register            |modes


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


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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-18463-280@http.gcc.gnu.org/bugzilla/>
2006-03-11  3:17 ` [Bug tree-optimization/18463] [4.0 Regression] suboptimal use of fancy x86 addressing modes mmitchel at gcc dot gnu dot org
2007-01-18  3:10 ` gdr at gcc dot gnu dot org
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
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-09-13 18:52 ` 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

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