This is the mail archive of the gcc@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: possible gcse failure: not able to eliminate redundant loads


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~


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