1 /* { dg-do compile } */
2 /* { dg-require-effective-target section_anchors } */
3 /* { dg-require-effective-target vect_int } */
7 /* Increase alignment of struct if an array's offset is multiple of alignment of
8 vector type corresponding to it's scalar type.
9 For the below test-case:
10 offsetof(e) == 8 bytes.
11 i) For arm: let x = alignment of vector type corresponding to int,
13 Since offsetof(e) % x == 0, set DECL_ALIGN(a, b, c) to x.
14 ii) For aarch64, ppc: x == 16 bytes.
15 Since offsetof(e) % x != 0, don't increase alignment of a, b, c.
25 for (int i
= 0; i
< N
; i
++)
26 a
.e
[i
] = b
.e
[i
] + c
.e
[i
];
31 /* { dg-final { scan-ipa-dump-times "Increasing alignment of decl" 0 "increase_alignment" { target aarch64*-*-* } } } */
32 /* { dg-final { scan-ipa-dump-times "Increasing alignment of decl" 0 "increase_alignment" { target powerpc64*-*-* } } } */
33 /* { dg-final { scan-ipa-dump-times "Increasing alignment of decl" 3 "increase_alignment" { target arm*-*-* } } } */