Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +lzcnt -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 short test__lzcnt16(unsigned short __X)
      9 {
     10   // CHECK: @llvm.ctlz.i16
     11   return __lzcnt16(__X);
     12 }
     13 
     14 unsigned int test_lzcnt32(unsigned int __X)
     15 {
     16   // CHECK: @llvm.ctlz.i32
     17   return __lzcnt32(__X);
     18 }
     19 
     20 unsigned long long test__lzcnt64(unsigned long long __X)
     21 {
     22   // CHECK: @llvm.ctlz.i64
     23   return __lzcnt64(__X);
     24 }
     25