1 // https://issues.dlang.org/show_bug.cgi?id=21727
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 } }
7 @nogc nothrow pure @safe:
13 pragma(inline
, false) ref typeof(this) doubleInPlace() return
14 @nogc nothrow pure @safe
16 mVector
= mVector
+ mVector
;
21 pragma(inline
, false) Float4
identity(Float4 a
)
26 pragma(inline
, true) Float4
twoTimes(const ref Float4 a
)
28 return Float4(a
.mVector
+ a
.mVector
);
31 pragma(inline
, false) Float4
fourTimes(const Float4 a
)
34 auto y
= x
.doubleInPlace(); // This crashed in dmd.backend.cgxmm.xmmload.
41 const c
= fourTimes(Float4([5,7,11,13]));
42 assert(c
.mVector
.array
== [20, 28, 44, 52]);