Craig Topper | 5c75208 | 2011-12-25 06:25:37 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +bmi -S -o - | FileCheck %s |
| 2 | |
| 3 | // Don't include mm_malloc.h, it's system specific. |
| 4 | #define __MM_MALLOC_H |
| 5 | |
| 6 | #include <x86intrin.h> |
| 7 | |
| 8 | unsigned short test__tzcnt16(unsigned short __X) |
| 9 | { |
| 10 | // CHECK: tzcntw |
| 11 | return __tzcnt16(__X); |
| 12 | } |
| 13 | |
| 14 | unsigned int test_tzcnt32(unsigned int __X) |
| 15 | { |
| 16 | // CHECK: tzcntl |
| 17 | return __tzcnt32(__X); |
| 18 | } |
| 19 | |
| 20 | unsigned long long test__tzcnt64(unsigned long long __X) |
| 21 | { |
| 22 | // CHECK: tzcntq |
| 23 | return __tzcnt64(__X); |
| 24 | } |