Debian Codegraph @

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

raw
1 // https://issues.dlang.org/show_bug.cgi?id=23009
2 // { dg-additional-options "-mavx" { target avx_runtime } }
3 // { dg-do run { target { avx_runtime || vect_sizes_16B_8B } } }
4 // { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
5 import core.simd;
6
7 double2 _mm_loadl_pd(double2 a, const(double)* mem_addr)
8 {
9 a[0] = *mem_addr;
10 return a;
11 }
12
13 void main()
14 {
15 double A = 7.0;
16 double2 B;
17 B[0] = 4.0;
18 B[1] = -5.0;
19 double2 R = _mm_loadl_pd(B, &A);
20 double[2] correct = [ 7.0, -5.0 ];
21 assert(R.array == correct);
22 }