This is the mail archive of the gcc-bugs@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]

[Bug middle-end/52436] New: BIT_FIELD_REF <MEM_REF <>> should be canonicalized for non-bitfield accesses


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;


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