2 /* { dg-require-effective-target sse4a } */
3 /* { dg-options "-O2 -msse4a" } */
5 #include "sse4a-check.h"
16 sse4a_test_insert (long long in1
, long long in2
)
19 long long index_length
, pad
;
21 index_length
= 0x0000000000000810LL
;
23 v1
= _mm_set_epi64x (pad
, in1
);
24 v2
= _mm_set_epi64x (index_length
, in2
);
25 v_out
.vec
= _mm_insert_si64 (v1
, v2
);
30 sse4a_test_inserti (long long in1
, long long in2
)
35 v1
= _mm_set_epi64x (pad
, in1
);
36 v2
= _mm_set_epi64x (pad
, in2
);
37 v_out
.vec
= _mm_inserti_si64 (v1
, v2
, (unsigned int) 0x10, (unsigned int) 0x08);
41 static int chk (long long i1
, long long i2
)
49 long long vals_in1
[5] =
58 long long vals_in2
[5] =
67 long long vals_out
[5] =
83 for (i
= 0; i
< 5; i
+= 1)
85 out
= sse4a_test_insert (vals_in1
[i
], vals_in2
[i
]);
86 fail
+= chk(out
, vals_out
[i
]);
88 out
= sse4a_test_inserti (vals_in1
[i
], vals_in2
[i
]);
89 fail
+= chk(out
, vals_out
[i
]);