Debian Codegraph @

gcc/testsuite/gcc.target/i386/tbm-pr116287.c

raw
1 /* PR target/116287 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mtbm -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-not "link_error \\\(\\\);" "optimized" } } */
5
6 #include <x86intrin.h>
7
8 extern void link_error (void);
9
10 void
11 tbm_test ()
12 {
13 unsigned int a = 0;
14 if (__builtin_ia32_bextri_u32 (a++, 0) != 0)
15 link_error ();
16 if (__builtin_ia32_bextri_u32 (a++, 0x120) != 0)
17 link_error ();
18 if (a != 2)
19 link_error ();
20 #ifdef __x86_64__
21 unsigned long long b = 0;
22 if (__builtin_ia32_bextr_u64 (b++, 0) != 0)
23 link_error ();
24 if (__builtin_ia32_bextr_u64 (b++, 0x140) != 0)
25 link_error ();
26 if (b != 2)
27 link_error ();
28 #endif
29 }