This patch adds the following SHA3 Intrinsics: vsha512hq_u64, vsha512h2q_u64, vsha512su0q_u64, vsha512su1q_u64 veor3q_u8 veor3q_u16 veor3q_u32 veor3q_u64 veor3q_s8 veor3q_s16 veor3q_s32 veor3q_s64 vrax1q_u64 vxarq_u64 vbcaxq_u8 vbcaxq_u16 vbcaxq_u32 vbcaxq_u64 vbcaxq_s8 vbcaxq_s16 vbcaxq_s32 vbcaxq_s64 Note need to include +sha3 and +crypto when building from the front-end
Details
Diff Detail
Event Timeline
This is the second of three patches to address the following:
https://bugs.llvm.org/show_bug.cgi?id=47828
clang/utils/TableGen/NeonEmitter.cpp | ||
---|---|---|
2118 | Consider alphabetizing the check. move isVXAR check after isVCT_N |
This looks like a straightforward implementation. The only caveat is that the XAR immediate does not represent a lane, and hence the need for a custom immediate range check. Looks sensible to me.
@labrinea and others at ARM, do have any other comment before this is merged?
One nit for now, I'll take a proper look tomorrow. Thanks for your work on these!
clang/test/CodeGen/aarch64-neon-sha3.c | ||
---|---|---|
26 | Nit: remove empty lines in this and the following |
The approach for xar looks fine to me, matches how we handled vcvt_n_* (https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=vcvt_n_).
clang/include/clang/Basic/arm_neon.td | ||
---|---|---|
1138 | Put the second set in c-s-i-l order like the first. | |
llvm/lib/Target/AArch64/AArch64InstrInfo.td | ||
928 | This is unused. | |
llvm/test/CodeGen/AArch64/neon-sha3.ll | ||
106 | I'm not sure you need to declare variants you aren't using but in any case you should test the missing ones e.g. crypto.eor3u.v8i16. |
llvm/lib/Target/AArch64/AArch64InstrInfo.td | ||
---|---|---|
928 | a good catch thank you! |
Thank you for reviewing this @DavidSpickett ! If you get a chance could you commit this for me? I do not have commit access yet.
clang/test/CodeGen/aarch64-neon-range-checks.c | ||
---|---|---|
31 | I added a "}" here. Please run ninja check-clang and/or check-llvm before you update patches. |
Put the second set in c-s-i-l order like the first.