gcc/testsuite/gcc.target/i386/pr87550.c
raw| 1 | /* PR target/87550 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2" } */ |
| 4 | |
| 5 | #include <x86intrin.h> |
| 6 | |
| 7 | int |
| 8 | foo (int x) |
| 9 | { |
| 10 | return __rdtsc () + __rdtsc (); |
| 11 | } |
| 12 | |
| 13 | /* { dg-final { scan-assembler-times "\trdtsc\[\n\r]" 2 } } */ |
| 14 | |
| 15 | int |
| 16 | bar (int x) |
| 17 | { |
| 18 | return __rdpmc (0) + __rdpmc (0); |
| 19 | } |
| 20 | |
| 21 | /* { dg-final { scan-assembler-times "\trdpmc\[\n\r]" 2 } } */ |