[cfe-commits] r159515 - in /cfe/trunk: lib/Headers/bmiintrin.h test/CodeGen/bmi-builtins.c

Craig Topper craig.topper at gmail.com
Sun Jul 1 23:52:52 PDT 2012


Author: ctopper
Date: Mon Jul  2 01:52:51 2012
New Revision: 159515

URL: http://llvm.org/viewvc/llvm-project?rev=159515&view=rev
Log:
Rename tzcnt intrinsics to match gcc.

Modified:
    cfe/trunk/lib/Headers/bmiintrin.h
    cfe/trunk/test/CodeGen/bmi-builtins.c

Modified: cfe/trunk/lib/Headers/bmiintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/bmiintrin.h?rev=159515&r1=159514&r2=159515&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/bmiintrin.h (original)
+++ cfe/trunk/lib/Headers/bmiintrin.h Mon Jul  2 01:52:51 2012
@@ -33,7 +33,7 @@
 #define __BMIINTRIN_H
 
 static __inline__ unsigned short __attribute__((__always_inline__, __nodebug__))
-__tzcnt16(unsigned short __X)
+__tzcnt_u16(unsigned short __X)
 {
   return __builtin_ctzs(__X);
 }
@@ -69,7 +69,7 @@
 }
 
 static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
-__tzcnt32(unsigned int __X)
+__tzcnt_u32(unsigned int __X)
 {
   return __builtin_ctz(__X);
 }
@@ -106,7 +106,7 @@
 }
 
 static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
-__tzcnt64(unsigned long long __X)
+__tzcnt_u64(unsigned long long __X)
 {
   return __builtin_ctzll(__X);
 }

Modified: cfe/trunk/test/CodeGen/bmi-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/bmi-builtins.c?rev=159515&r1=159514&r2=159515&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/bmi-builtins.c (original)
+++ cfe/trunk/test/CodeGen/bmi-builtins.c Mon Jul  2 01:52:51 2012
@@ -5,9 +5,9 @@
 
 #include <x86intrin.h>
 
-unsigned short test__tzcnt16(unsigned short __X) {
+unsigned short test__tzcnt_u16(unsigned short __X) {
   // CHECK: @llvm.cttz.i16
-  return __tzcnt16(__X);
+  return __tzcnt_u16(__X);
 }
 
 unsigned int test__andn_u32(unsigned int __X, unsigned int __Y) {
@@ -39,9 +39,9 @@
   return __blsr_u32(__X);
 }
 
-unsigned int test_tzcnt32(unsigned int __X) {
+unsigned int test_tzcnt_u32(unsigned int __X) {
   // CHECK: @llvm.cttz.i32
-  return __tzcnt32(__X);
+  return __tzcnt_u32(__X);
 }
 
 unsigned long long test__andn_u64(unsigned long __X, unsigned long __Y) {
@@ -73,7 +73,7 @@
   return __blsr_u64(__X);
 }
 
-unsigned long long test__tzcnt64(unsigned long long __X) {
+unsigned long long test__tzcnt_u64(unsigned long long __X) {
   // CHECK: @llvm.cttz.i64
-  return __tzcnt64(__X);
+  return __tzcnt_u64(__X);
 }





More information about the cfe-commits mailing list