A big-endian version of vpermxor, named vpermxor_be, is added to LLVM and Clang. vpermxor_be can be called directly on both the little-endian and the big-endian platforms.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Please also add a test for this builtin to the front end test clang/test/CodeGen/builtins-ppc-crypto.c
llvm/lib/Target/PowerPC/PPCInstrVSX.td | ||
---|---|---|
2500 | Although it would be redundant, it is not invalid to use this builtin/intrinsic in BE compilations. As such, please move this to a block that has only the | |
llvm/test/CodeGen/PowerPC/crypto_bifs_be.ll | ||
10 | Please clean up this test case a bit:
|
- Added test for vpermxor_be in clang/test/CodeGen/builtins-ppc-crypto.c.
- Placed vpermxor_be under [HasVSX, HasP8Altivec] in llvm/lib/Target/PowerPC/PPCInstrVSX.td.
- Updated test llvm/test/CodeGen/PowerPC/crypto_bifs_be.ll.
LGTM.
llvm/lib/Target/PowerPC/PPCInstrVSX.td | ||
---|---|---|
2506 | Nit: the v16i8 should be aligned with the v16i8 above. | |
llvm/test/CodeGen/PowerPC/crypto_bifs_be.ll | ||
9 | There isn't really any difference in how we handle this on P9 so this run line is probably superfluous. Feel free to get rid of it when pushing this upstream. |
- The P9 RUN step on big-endian platform is removed from the lit test.
- Fixed formatting in llvm/lib/Target/PowerPC/PPCInstrVSX.td
Although it would be redundant, it is not invalid to use this builtin/intrinsic in BE compilations. As such, please move this to a block that has only the
[HasVSX, HasP8Altivec] predicates as the desired code is the same for LE/BE.