1 // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +lzcnt -emit-llvm -o - | FileCheck %s 2 3 4 #include <immintrin.h> 5 test__lzcnt16(unsigned short __X)6unsigned short test__lzcnt16(unsigned short __X) 7 { 8 // CHECK: @llvm.ctlz.i16(i16 %{{.*}}, i1 false) 9 return __lzcnt16(__X); 10 } 11 test_lzcnt32(unsigned int __X)12unsigned int test_lzcnt32(unsigned int __X) 13 { 14 // CHECK: @llvm.ctlz.i32(i32 %{{.*}}, i1 false) 15 return __lzcnt32(__X); 16 } 17 test__lzcnt64(unsigned long long __X)18unsigned long long test__lzcnt64(unsigned long long __X) 19 { 20 // CHECK: @llvm.ctlz.i64(i64 %{{.*}}, i1 false) 21 return __lzcnt64(__X); 22 } 23 test_lzcnt_u32(unsigned int __X)24unsigned int test_lzcnt_u32(unsigned int __X) 25 { 26 // CHECK: @llvm.ctlz.i32(i32 %{{.*}}, i1 false) 27 return _lzcnt_u32(__X); 28 } 29 test__lzcnt_u64(unsigned long long __X)30unsigned long long test__lzcnt_u64(unsigned long long __X) 31 { 32 // CHECK: @llvm.ctlz.i64(i64 %{{.*}}, i1 false) 33 return _lzcnt_u64(__X); 34 } 35