[clang] 1cc1d9d - [PowerPC] Add vec_vclz as an alias for vec_cntlz in altivec.h

Nemanja Ivanovic via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 22 08:31:34 PDT 2021


Author: Nemanja Ivanovic
Date: 2021-04-22T10:31:00-05:00
New Revision: 1cc1d9db286c7fbd0ff0a0757c2da2a5a6fc54a8

URL: https://github.com/llvm/llvm-project/commit/1cc1d9db286c7fbd0ff0a0757c2da2a5a6fc54a8
DIFF: https://github.com/llvm/llvm-project/commit/1cc1d9db286c7fbd0ff0a0757c2da2a5a6fc54a8.diff

LOG: [PowerPC] Add vec_vclz as an alias for vec_cntlz in altivec.h

Another addition for compatibility with XLC. The functions have the
same overloads so just add it as a preprocessor define.

Added: 
    

Modified: 
    clang/lib/Headers/altivec.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/altivec.h b/clang/lib/Headers/altivec.h
index 48b43cb78374..4eac243ef2d5 100644
--- a/clang/lib/Headers/altivec.h
+++ b/clang/lib/Headers/altivec.h
@@ -2400,6 +2400,7 @@ vec_popcnt(vector unsigned long long __a) {
   return __builtin_altivec_vpopcntd(__a);
 }
 
+#define vec_vclz vec_cntlz
 /* vec_cntlz */
 
 static __inline__ vector signed char __ATTRS_o_ai


        


More information about the cfe-commits mailing list