Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gdc.dg / simd7951.d
blob4e467ef0f96663c7552b84064e0c3f21fcc829cc
1 // https://issues.dlang.org/show_bug.cgi?id=7951
2 // { dg-additional-options "-mavx" { target avx_runtime } }
3 // { dg-do compile { target { avx_runtime || vect_sizes_16B_8B } } }
4 import core.simd;
6 float[4] test7951()
8 float4 v1;
9 float4 v2;
11 return cast(float[4])(v1+v2);
14 void test7951_2()
16 float[4] v1 = [1,2,3,4];
17 float[4] v2 = [1,2,3,4];
18 float4 f1, f2, f3;
19 f1.array = v1;
20 f2.array = v2;
21 f3 = f1 + f2;
22 assert((cast(float[4])f3)[2] == 6);