This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49444] New: IV-OPTs changes an unaligned loads into aligned loads incorrectly
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Jun 2011 19:44:42 +0000
- Subject: [Bug tree-optimization/49444] New: IV-OPTs changes an unaligned loads into aligned loads incorrectly
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49444
Summary: IV-OPTs changes an unaligned loads into aligned loads
incorrectly
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pinskia@gcc.gnu.org
Take:
/* { dg-do compile { target mips*-*-* } } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler "uld\\t|ldr\\t|lwr\\t" } } */
struct s
{
unsigned int l;
unsigned int z[2];
};
struct r
{
char c;
struct s s;
} __attribute__ ((packed));
struct s *ss;
f (struct r *p, int l)
{
int i;
for (i = 0; i < l; i++)
{
*ss = p[i].s;
g ();
}
}
--- CUT ---
Currently this fails and the load from p[i].s is turned into an aligned load.