The instruction has similar semantics to vbpermq but for doublewords. It was added in P9 and the ABI documents the builtin.
Details
- Reviewers
bmahjour lei - Group Reviewers
Restricted Project - Commits
- rG09b67aa1c382: [PowerPC] Implement builtin for vbpermd
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM
clang/lib/Headers/altivec.h | ||
---|---|---|
17367 | I think this is actually guarded under __POWER8_VECTOR__. See line 17237. | |
17382 | nit: It would be more clear if we had a comment here what this endif if for. I assume it's /* __POWER8_VECTOR__ */ |
clang/lib/Headers/altivec.h | ||
---|---|---|
17367 |
You are right. I missed that.
__builtin_altivec_vbpermd is being called on line 17356...not sure if it corresponds to an IR intrinsic or not, but regardless we have vec_vbpermq in this header but not vec_vbpermd. That seems inconsistent to me. |
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.