Debian Codegraph @

gcc/testsuite/gdc.dg/torture/simd6.d

raw
1 // { dg-additional-options "-mavx2" { target avx2_runtime } }
2 // { dg-do run { target { avx2_runtime || vect_sizes_32B_16B } } }
3 // { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
4 import core.simd;
5
6 void test6a()
7 {
8 // stack occasionally misaligned
9 float f = 0;
10 long4 v;
11 assert((cast(size_t)&v) % 32 == 0);
12 v += 1;
13 }
14
15 void test6b()
16 {
17 struct S {long4 v;}
18 S s;
19 assert((cast(size_t)&s) % 32 == 0);
20 }
21
22 void main()
23 {
24 test6a();
25 test6b();
26 }