Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / p9-extract-4.c
blob1f38982fbe7d9ff0dd9cf04aa0345cffd20502ad
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
3 /* { dg-require-effective-target powerpc_p9vector_ok } */
4 /* { dg-options "-mcpu=power9 -O2" } */
6 /* This file tests the extraction of 64-bit values. On Power 9, the direct
7 move is prefered for the 64-bit extract as it is either lower latency or
8 the same latency as the extract instruction depending on the Endianess of
9 the system. Furthermore, there can be up to four move instructions in
10 flight at a time versus only two extract intructions at a time. */
12 #include <altivec.h>
14 unsigned long long
15 extract_bool_long_long_0 (vector bool long long a)
17 int c = 0;
18 unsigned long long b = vec_extract (a, c);
19 return b;
22 unsigned long long int
23 extract_long_long_0 (vector unsigned long long int a)
25 int c = 0;
26 unsigned long long int b = vec_extract (a, c);
27 return b;
30 /* { dg-final { scan-assembler-times "m\[ft\]vsr" 2 } } */