This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: possible gcse failure: not able to eliminate redundant loads
- From: Richard Henderson <rth at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Daniel Berlin <dberlin at dberlin dot org>, Dale Johannesen <dalej at apple dot com>, "Sanjiv Kumar Gupta, Noida" <sanjivg at noida dot hcltech dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 12 Dec 2002 14:42:13 -0800
- Subject: Re: possible gcse failure: not able to eliminate redundant loads
- References: <20021212222853.GA28987@redhat.com> <200212122231.RAA22984@makai.watson.ibm.com>
On Thu, Dec 12, 2002 at 05:31:39PM -0500, David Edelsohn wrote:
> I do not believe that the code exists, or if the code exists it is
> disabled because it is broken in other ways, not alias.c.
Yawn.
int x;
void foo()
{
int i;
for (i = 0; i < 100; i++)
x += i;
}
foo:
movl x, %eax
xorl %edx, %edx
.p2align 4,,15
.L6:
addl %edx, %eax
incl %edx
cmpl $99, %edx
jle .L6
movl %eax, x
ret
And from the .loop dump file,
Loop from 10 to 31: 6 real insns.
Continue at insn 23.
Hoisted regno 62 r/w from (mem/f:SI (symbol_ref:SI ("x")) [2 x+0 S4 A32])
Believe me now?
r~