Handle T_HRESULT types in CodeView records
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / p9-extract-4.c
blob9bdfd882aebf969d566f09c8de41022645833907
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-options "-mdejagnu-cpu=power9 -mvsx -O2" } */
3 /* { dg-require-effective-target powerpc_vsx } */
5 /* This file tests the extraction of 64-bit values. On Power 9, the direct
6 move is prefered for the 64-bit extract as it is either lower latency or
7 the same latency as the extract instruction depending on the Endianess of
8 the system. Furthermore, there can be up to four move instructions in
9 flight at a time versus only two extract intructions at a time. */
11 #include <altivec.h>
13 unsigned long long
14 extract_bool_long_long_0 (vector bool long long a)
16 int c = 0;
17 unsigned long long b = vec_extract (a, c);
18 return b;
21 unsigned long long int
22 extract_long_long_0 (vector unsigned long long int a)
24 int c = 0;
25 unsigned long long int b = vec_extract (a, c);
26 return b;
29 /* { dg-final { scan-assembler-times "m\[ft\]vsr" 2 } } */