2 /* { dg-options "-O1 -msse2 -ftree-vectorize" } */
3 /* { dg-require-effective-target sse2 } */
6 #define CHECK_H "sse2-check.h"
10 #define TEST sse2_test
15 unsigned short v1
[] __attribute__ ((aligned(16))) =
17 0x8000, 0x9000, 1, 10, 0xa000, 0xb000, 2, 20,
18 3, 30, 0xd000, 0xe000, 0xf000, 0xe000, 25, 30
20 unsigned short v2
[] __attribute__ ((aligned(16))) =
22 4, 40, 0xb000, 0x8000, 5, 50, 0xc000, 0xf000,
23 0xd000, 0xa000, 6, 65, 7, 75, 0xe000, 0xc000
26 unsigned short max
[] =
28 0x8000, 0x9000, 0xb000, 0x8000, 0xa000, 0xb000, 0xc000, 0xf000,
29 0xd000, 0xa000, 0xd000, 0xe000, 0xf000, 0xe000, 0xe000, 0xc000
32 unsigned short min
[] =
34 4, 40, 1, 10, 5, 50, 2, 20,
35 3, 30, 6, 65, 7, 75, 25, 30
38 unsigned short res
[16] __attribute__ ((aligned(16)));
40 extern void abort (void);
47 for (i
= 0; i
< 16; i
++)
48 res
[i
] = v1
[i
] < v2
[i
] ? v2
[i
] : v1
[i
];
56 for (i
= 0; i
< 16; i
++)
57 res
[i
] = v1
[i
] > v2
[i
] ? v2
[i
] : v1
[i
];
67 for (i
= 0; i
< 16; i
++)
72 for (i
= 0; i
< 16; i
++)