1 /* { dg-require-effective-target int32plus } */
2 
3 void
sample_move_d32u24_sS(char * dst,float * src,unsigned long nsamples,unsigned long dst_skip)4 sample_move_d32u24_sS (char *dst, float *src, unsigned long nsamples,
5 		       unsigned long dst_skip)
6 {
7   long long y;
8   while (nsamples--)
9     {
10       y = (long long) (*src * 8388608.0f) << 8;
11       if (y > 2147483647) {
12 	*(int *) dst = 2147483647;
13       } else if (y < -2147483647 - 1) {
14 	*(int *) dst = -2147483647 - 1;
15       } else {
16 	*(int *) dst = (int) y;
17       }
18       dst += dst_skip;
19       src++;
20     }
21 }
22