| // https://issues.dlang.org/show_bug.cgi?id=7414 |
| // { dg-additional-options "-mavx" { target avx_runtime } } |
| // { dg-do run { target { avx_runtime || vect_sizes_16B_8B } } } |
| // { dg-skip-if "needs gcc/config.d" { ! d_runtime } } |
| import core.simd; |
| import core.stdc.string; |
| |
| immutable ulong2 gulong2 = 0x8000_0000_0000_0000; |
| immutable uint4 guint4 = 0x8000_0000; |
| immutable ushort8 gushort8 = 0x8000; |
| immutable ubyte16 gubyte16 = 0x80; |
| |
| immutable long2 glong2 = 0x7000_0000_0000_0000; |
| immutable int4 gint4 = 0x7000_0000; |
| immutable short8 gshort8 = 0x7000; |
| immutable byte16 gbyte16 = 0x70; |
| |
| immutable float4 gfloat4 = 4.0; |
| immutable double2 gdouble2 = 8.0; |
| |
| void main() |
| { |
| immutable ulong2 lulong2 = 0x8000_0000_0000_0000; |
| assert(memcmp(&lulong2, &gulong2, gulong2.sizeof) == 0); |
| |
| immutable uint4 luint4 = 0x8000_0000; |
| assert(memcmp(&luint4, &guint4, guint4.sizeof) == 0); |
| |
| immutable ushort8 lushort8 = 0x8000; |
| assert(memcmp(&lushort8, &gushort8, gushort8.sizeof) == 0); |
| |
| immutable ubyte16 lubyte16 = 0x80; |
| assert(memcmp(&lubyte16, &gubyte16, gubyte16.sizeof) == 0); |
| |
| |
| immutable long2 llong2 = 0x7000_0000_0000_0000; |
| assert(memcmp(&llong2, &glong2, glong2.sizeof) == 0); |
| |
| immutable int4 lint4 = 0x7000_0000; |
| assert(memcmp(&lint4, &gint4, gint4.sizeof) == 0); |
| |
| immutable short8 lshort8 = 0x7000; |
| assert(memcmp(&lshort8, &gshort8, gshort8.sizeof) == 0); |
| |
| immutable byte16 lbyte16 = 0x70; |
| assert(memcmp(&lbyte16, &gbyte16, gbyte16.sizeof) == 0); |
| |
| |
| immutable float4 lfloat4 = 4.0; |
| assert(memcmp(&lfloat4, &gfloat4, gfloat4.sizeof) == 0); |
| |
| immutable double2 ldouble2 = 8.0; |
| assert(memcmp(&ldouble2, &gdouble2, gdouble2.sizeof) == 0); |
| } |