https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85697

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu.org
          Component|target                      |tree-optimization

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Interesting:
```
struct alignas(16) A {
    A (void) :a(0),b(0),c(0),d(0) {}
    int a,b,c,d;
};
__attribute__((noinline, noipa)) void UseA (A& a) { a.a=1; }

int main (void)
{
    char b[sizeof(A)] = {};
    A a {};
    __builtin_memcpy(&a, b, sizeof(a));
    UseA (a);
    return a.a;
}
```

Generates:
  MEM <uint128_t> [(char * {ref-all})&a] = 0;

Store merging only goes up to:
/* The maximum size (in bits) of the stores this pass should generate.  */
#define MAX_STORE_BITSIZE (BITS_PER_WORD)
#define MAX_STORE_BYTES (MAX_STORE_BITSIZE / BITS_PER_UNIT)

Blah.

Reply via email to