| 1 |
// https://issues.dlang.org/show_bug.cgi?id=21673 |
| 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 |
float4 _mm_move_ss(float4 a, float4 b) |
| 8 |
{ |
| 9 |
a.ptr[0] = b.array[0]; |
| 10 |
return a; |
| 11 |
} |
| 12 |
|
| 13 |
void main() |
| 14 |
{ |
| 15 |
float4 A = [1.0f, 2.0f, 3.0f, 4.0f]; |
| 16 |
float4 B = [5.0f, 6.0f, 7.0f, 8.0f]; |
| 17 |
float4 R = _mm_move_ss(A, B); |
| 18 |
float[4] correct = [5.0f, 2.0f, 3.0f, 4.0f]; |
| 19 |
assert(R.array == correct); |
| 20 |
} |