1 /* { dg-do run { target { power10_hw } } } */
2 /* { dg-options "-mdejagnu-cpu=power10 -save-temps" } */
12 extern void abort (void);
15 main (int argc
, char *argv
[])
18 vector
unsigned long long int vresult_ullint
;
19 vector
unsigned long long int expected_vresult_ullint
;
20 vector
unsigned long long int src_va_ullint
;
21 unsigned int long long src_a_ullint
;
23 /* Replace doubleword size chunk specified as a constant that can be
24 represented by an int. Should generate a vinsd instruction. Note, this
25 test requires command line option -flax-vector-conversions. */
27 src_va_ullint
= (vector
unsigned long long int) { 0, 11 };
28 vresult_ullint
= (vector
unsigned long long int) { 0, 2 };
29 expected_vresult_ullint
= (vector
unsigned long long int) { 0, 456 };
31 vresult_ullint
= (vector
unsigned long long int)
32 vec_replace_unaligned ((vector
unsigned char)src_va_ullint
,
35 if (!vec_all_eq (vresult_ullint
, expected_vresult_ullint
)) {
37 printf("ERROR, vec_replace_unaligned ((vector unsigned char)src_vb_ullint, src_a_ullint, index)\n");
38 for (i
= 0; i
< 2; i
++)
39 printf(" vresult_ullint[%d] = %d, expected_vresult_ullint[%d] = %d\n",
40 i
, vresult_ullint
[i
], i
, expected_vresult_ullint
[i
]);
49 /* { dg-final { scan-assembler-times {\mvinsd\M} 1 } } */