1 // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +bmi2 -emit-llvm -o - | FileCheck %s
2 // RUN: %clang_cc1 -ffreestanding %s -triple=i386-apple-darwin -target-feature +bmi2 -emit-llvm -o - | FileCheck %s --check-prefix=B32
7 unsigned int test_bzhi_u32(unsigned int __X
, unsigned int __Y
) {
8 // CHECK: @llvm.x86.bmi.bzhi.32
9 return _bzhi_u32(__X
, __Y
);
12 unsigned int test_pdep_u32(unsigned int __X
, unsigned int __Y
) {
13 // CHECK: @llvm.x86.bmi.pdep.32
14 return _pdep_u32(__X
, __Y
);
17 unsigned int test_pext_u32(unsigned int __X
, unsigned int __Y
) {
18 // CHECK: @llvm.x86.bmi.pext.32
19 return _pext_u32(__X
, __Y
);
23 unsigned int test_mulx_u32(unsigned int __X
, unsigned int __Y
,
25 // B32: @test_mulx_u32
27 return _mulx_u32(__X
, __Y
, __P
);
32 unsigned long long test_bzhi_u64(unsigned long long __X
, unsigned long long __Y
) {
33 // CHECK: @llvm.x86.bmi.bzhi.64
34 return _bzhi_u64(__X
, __Y
);
37 unsigned long long test_pdep_u64(unsigned long long __X
, unsigned long long __Y
) {
38 // CHECK: @llvm.x86.bmi.pdep.64
39 return _pdep_u64(__X
, __Y
);
42 unsigned long long test_pext_u64(unsigned long long __X
, unsigned long long __Y
) {
43 // CHECK: @llvm.x86.bmi.pext.64
44 return _pext_u64(__X
, __Y
);
47 unsigned long long test_mulx_u64(unsigned long long __X
, unsigned long long __Y
,
48 unsigned long long *__P
) {
49 // CHECK: @test_mulx_u64
51 return _mulx_u64(__X
, __Y
, __P
);