2 /* { dg-require-effective-target xop } */
3 /* { dg-options "-O2 -mxop" } */
15 unsigned char ssi
[NUM
* 16];
16 unsigned short si
[NUM
* 8];
17 unsigned int li
[NUM
* 4];
18 unsigned long long lli
[NUM
* 2];
25 for (i
=0; i
< NUM
* 16; i
++)
33 for (i
=0; i
< NUM
* 8; i
++)
42 for (i
=0; i
< NUM
* 4; i
++)
49 int i
, j
, s
, t
, check_fails
= 0;
50 for (i
= 0; i
< NUM
* 16; i
= i
+ 16)
52 for (j
= 0; j
< 8; j
++)
56 res
.si
[s
] = src1
.ssi
[t
] + src1
.ssi
[t
+ 1] ;
57 if (res
.si
[s
] != dst
.si
[s
])
66 int i
, j
, s
, t
, check_fails
= 0;
67 for (i
= 0; i
< NUM
* 16; i
= i
+ 16)
69 for (j
= 0; j
< 4; j
++)
73 res
.li
[s
] = (src1
.ssi
[t
] + src1
.ssi
[t
+ 1]) + (src1
.ssi
[t
+ 2]
75 if (res
.li
[s
] != dst
.li
[s
])
85 int i
, j
, s
, t
, check_fails
= 0;
86 for (i
= 0; i
< NUM
* 16; i
= i
+ 16)
88 for (j
= 0; j
< 2; j
++)
92 res
.lli
[s
] = ((src1
.ssi
[t
] + src1
.ssi
[t
+ 1]) + (src1
.ssi
[t
+ 2]
93 + src1
.ssi
[t
+ 3])) + ((src1
.ssi
[t
+ 4] + src1
.ssi
[t
+5])
94 + (src1
.ssi
[t
+ 6] + src1
.ssi
[t
+ 7]));
95 if (res
.lli
[s
] != dst
.lli
[s
])
105 int i
, j
, s
, t
, check_fails
= 0;
106 for (i
= 0; i
< (NUM
* 8); i
= i
+ 8)
108 for (j
= 0; j
< 4; j
++)
112 res
.li
[s
] = src1
.si
[t
] + src1
.si
[t
+ 1] ;
113 if (res
.li
[s
] != dst
.li
[s
])
122 int i
, j
, s
, t
, check_fails
= 0;
123 for (i
= 0; i
< NUM
* 8; i
= i
+ 8)
125 for (j
= 0; j
< 2; j
++)
129 res
.lli
[s
] = (src1
.si
[t
] + src1
.si
[t
+ 1]) + (src1
.si
[t
+ 2]
131 if (res
.lli
[s
] != dst
.lli
[s
])
135 return check_fails
++;
141 int i
, j
, s
, t
, check_fails
= 0;
142 for (i
= 0; i
< (NUM
* 4); i
= i
+ 4)
144 for (j
= 0; j
< 2; j
++)
148 res
.lli
[s
] = src1
.li
[t
] + src1
.li
[t
+ 1] ;
149 if (res
.lli
[s
] != dst
.lli
[s
])
163 for (i
= 0; i
< NUM
; i
++)
164 dst
.x
[i
] = _mm_haddw_epu8 (src1
.x
[i
]);
166 if (check_byte2word())
170 for (i
= 0; i
< (NUM
); i
++)
171 dst
.x
[i
] = _mm_haddd_epu8 (src1
.x
[i
]);
173 if (check_byte2dword())
177 for (i
= 0; i
< NUM
; i
++)
178 dst
.x
[i
] = _mm_haddq_epu8 (src1
.x
[i
]);
180 if (check_byte2qword())
186 for (i
= 0; i
< (NUM
); i
++)
187 dst
.x
[i
] = _mm_haddd_epu16 (src1
.x
[i
]);
189 if (check_word2dword())
194 for (i
= 0; i
< NUM
; i
++)
195 dst
.x
[i
] = _mm_haddq_epu16 (src1
.x
[i
]);
197 if (check_word2qword())
202 for (i
= 0; i
< NUM
; i
++)
203 dst
.x
[i
] = _mm_haddq_epu32 (src1
.x
[i
]);
205 if (check_dword2qword())