[PATCH] D107899: [PowerPC] Implement builtin for vbpermd

Bardia Mahjour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 11 07:15:15 PDT 2021


bmahjour added inline comments.


================
Comment at: clang/lib/Headers/altivec.h:17337
 static __inline__ vector long long __ATTRS_o_ai
 vec_vbpermq(vector unsigned char __a, vector unsigned char __b) {
   return __builtin_altivec_vbpermq(__a, __b);
----------------
This should be guarded under P8. It would also be good to add a `vec_vbpermd(vector unsigned long long ...)` counter part under `__POWER9_VECTOR__` for consistency.


================
Comment at: clang/lib/Headers/altivec.h:17349
+static __inline__ vector unsigned char __ATTRS_o_ai
+vec_bperm(vector unsigned char __a, vector unsigned char __b) {
+  return __builtin_altivec_vbpermq(__a, __b);
----------------
`vbpermq` variants should be guarded under `__POWER8_VECTOR__`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107899/new/

https://reviews.llvm.org/D107899



More information about the cfe-commits mailing list