Craig Topper | f58f364 | 2011-12-26 02:31:10 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +bmi2 -emit-llvm -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 int test_bzhi_u32(unsigned int __X, unsigned int __Y) { |
| 9 | // CHECK: @llvm.x86.bmi.bzhi.32 |
| 10 | return _bzhi_u32(__X, __Y); |
| 11 | } |
| 12 | |
| 13 | unsigned int test_pdep_u32(unsigned int __X, unsigned int __Y) { |
| 14 | // CHECK: @llvm.x86.bmi.pdep.32 |
| 15 | return _pdep_u32(__X, __Y); |
| 16 | } |
| 17 | |
| 18 | unsigned int test_pext_u32(unsigned int __X, unsigned int __Y) { |
| 19 | // CHECK: @llvm.x86.bmi.pext.32 |
| 20 | return _pext_u32(__X, __Y); |
| 21 | } |
| 22 | |
| 23 | unsigned long long test_bzhi_u64(unsigned long long __X, unsigned long long __Y) { |
| 24 | // CHECK: @llvm.x86.bmi.bzhi.64 |
| 25 | return _bzhi_u64(__X, __Y); |
| 26 | } |
| 27 | |
| 28 | unsigned long long test_pdep_u64(unsigned long long __X, unsigned long long __Y) { |
| 29 | // CHECK: @llvm.x86.bmi.pdep.64 |
| 30 | return _pdep_u64(__X, __Y); |
| 31 | } |
| 32 | |
| 33 | unsigned long long test_pext_u64(unsigned long long __X, unsigned long long __Y) { |
| 34 | // CHECK: @llvm.x86.bmi.pext.64 |
| 35 | return _pext_u64(__X, __Y); |
| 36 | } |