[Bug tree-optimization/18431] Code for arrays and pointers are not the same
rakdver at atrey dot karlin dot mff dot cuni dot cz
gcc-bugzilla@gcc.gnu.org
Fri Nov 12 14:48:00 GMT 2004
------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz 2004-11-12 14:48 -------
Subject: Re: Code for arrays and pointers are not the same
> huh a compiler built with that patch gives:
> L4:
> slwi r2,r9,1
> addi r9,r9,1
> sthx r0,r2,r11
> bdnz L4
>
> Also pulling the load manually out loop also produce the same asm as I just produced:
> unsigned short *q;
> #define NOSB 10
> int last;
> void h1()
> {
> int i;
> unsigned short *q1 = q;
> for (i=0;i<last+NOSB;i++)
> {
> q1[i] = 0;
> }
> }
not for me:
.L4:
sth 0,0(9)
addi 9,9,2
bdnz .L4
what architecture/flags are you using?
Zdenek
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18431
More information about the Gcc-bugs
mailing list