This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/52436] New: BIT_FIELD_REF <MEM_REF <>> should be canonicalized for non-bitfield accesses
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Feb 2012 14:20:05 +0000
- Subject: [Bug middle-end/52436] New: BIT_FIELD_REF <MEM_REF <>> should be canonicalized for non-bitfield accesses
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52436
Bug #: 52436
Summary: BIT_FIELD_REF <MEM_REF <>> should be canonicalized for
non-bitfield accesses
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: middle-end
AssignedTo: rguenth@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
typedef long long __m128i __attribute__ ((__vector_size__ (16),
__may_alias__));
typedef struct
{
__m128i b;
} s_1a;
typedef s_1a s_1m __attribute__((aligned(1)));
void
foo (s_1m *p)
{
p->b[1] = 5;
}
Produces in .optimized
foo (struct s_1m * p)
{
<bb 2>:
BIT_FIELD_REF <p_1(D)->b, 64, 64> = 5;
return;
}
we should have canoncialized (aka fold_stmt'ed) the LHS to
MEM <(__m128i *)p_1(D), 8> = 5;