This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18431] Code for arrays and pointers are not the same
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Nov 2004 14:44:55 -0000
- Subject: [Bug tree-optimization/18431] Code for arrays and pointers are not the same
- References: <20041111180852.18431.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-12 14:44 -------
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;
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18431