* config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / extr.c
blobb656dc05c54fe89705daa9e0ebc66fc9eff15bfc
1 /* { dg-options "-O2 --save-temps" } */
2 /* { dg-do run } */
4 extern void abort (void);
6 int
7 test_si (int a, int b)
9 /* { dg-final { scan-assembler "extr\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, 27\n" } } */
10 return (a << 5) | ((unsigned int) b >> 27);
13 long long
14 test_di (long long a, long long b)
16 /* { dg-final { scan-assembler "extr\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, 45\n" } } */
17 return (a << 19) | ((unsigned long long) b >> 45);
20 int
21 main ()
23 int v;
24 long long w;
25 v = test_si (0x00000004, 0x30000000);
26 if (v != 0x00000086)
27 abort();
28 w = test_di (0x0001040040040004ll, 0x0070050066666666ll);
29 if (w != 0x2002002000200380ll)
30 abort();
31 return 0;