public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/19580] New: [3.4/4.0 Regression] poor register allocation
@ 2005-01-23  1:35 belyshev at depni dot sinp dot msu dot ru
  2005-05-19 17:31 ` [Bug rtl-optimization/19580] [3.4/4.0/4.1 Regression] missed load/store motion mmitchel at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-01-23  1:35 UTC (permalink / raw)
  To: gcc-bugs

------------------------------------------------------------------------------
int r[6];

void f (int n)
{
  while (-- n)
    {
      r [0] += r [5];
      r [1] += r [0];
      r [2] += r [1];
      r [3] += r [2];
      r [4] += r [3];
      r [5] += r [4];
    }
}
------------------------------------------------------------------------------

On i386 with -O2 -fomit-frame-pointer we get:

.L4:
	movl	20(%esp), %ebp
	movl	8(%esp), %eax
	movl	16(%esp), %ebx
	incl	24(%esp)
	addl	%edi, %ebp
	leal	(%ebp,%eax), %esi
	movl	12(%esp), %eax
	movl	%ebp, 20(%esp)
	leal	(%esi,%ebx), %ecx
	movl	4(%esp), %ebx
	movl	%esi, 8(%esp)
	leal	(%ecx,%eax), %edx
	movl	%ecx, 16(%esp)
	leal	(%edx,%ebx), %eax
	movl	24(%esp), %ebx
	cmpl	%ebx, 28(%esp)
	movl	%edx, 12(%esp)
	leal	(%eax,%edi), %edi
	movl	%eax, 4(%esp)
	movl	%edi, (%esp)
	jne	.L4

workaround: -fno-gcse

-- 
           Summary: [3.4/4.0 Regression] poor register allocation
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, ra
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at depni dot sinp dot msu dot ru
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2009-04-22 15:09 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19580-7958@http.gcc.gnu.org/bugzilla/>
2005-10-16 22:14 ` [Bug rtl-optimization/19580] [3.4/4.0/4.1 Regression] missed load/store motion pinskia at gcc dot gnu dot org
2005-10-17 10:28 ` uros at kss-loka dot si
2005-10-31  2:34 ` mmitchel at gcc dot gnu dot org
2006-02-03 16:44 ` [Bug rtl-optimization/19580] [3.4/4.0/4.1/4.2 " steven at gcc dot gnu dot org
2006-02-04 13:52 ` rguenth at gcc dot gnu dot org
2006-02-04 21:30 ` dberlin at gcc dot gnu dot org
2006-02-14 16:48 ` rguenth at gcc dot gnu dot org
2006-02-24  0:25 ` mmitchel at gcc dot gnu dot org
2006-05-25  2:34 ` [Bug rtl-optimization/19580] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
2007-02-14  9:05 ` [Bug rtl-optimization/19580] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
2007-04-17  5:53 ` dberlin at gcc dot gnu dot org
2007-04-17  8:22 ` rguenth at gcc dot gnu dot org
2007-09-12 14:44 ` rguenth at gcc dot gnu dot org
2007-09-12 14:49 ` rakdver at gcc dot gnu dot org
2007-09-12 15:09 ` eres at il dot ibm dot com
2007-09-13  4:45 ` eres at il dot ibm dot com
2008-01-23  9:28 ` steven at gcc dot gnu dot org
2008-01-23 10:35 ` rguenth at gcc dot gnu dot org
2008-03-28 13:41 ` [Bug rtl-optimization/19580] [4.1/4.2/4.3 " rguenth at gcc dot gnu dot org
2008-03-28 13:46 ` rguenth at gcc dot gnu dot org
2008-07-04 16:49 ` [Bug rtl-optimization/19580] [4.2/4.3 " jsm28 at gcc dot gnu dot org
2009-03-31 16:46 ` [Bug rtl-optimization/19580] [4.3 " jsm28 at gcc dot gnu dot org
2009-04-22 15:09 ` rguenth at gcc dot gnu dot org
2005-01-23  1:35 [Bug rtl-optimization/19580] New: [3.4/4.0 Regression] poor register allocation belyshev at depni dot sinp dot msu dot ru
2005-05-19 17:31 ` [Bug rtl-optimization/19580] [3.4/4.0/4.1 Regression] missed load/store motion mmitchel at gcc dot gnu dot org
2005-07-22 21:16 ` pinskia at gcc dot gnu dot org
2005-09-27 16:12 ` 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).