truffle: add AArch64 wide path using vqtbl2q - #406
Open
a-eridani wants to merge 1 commit into
Open
Conversation
a-eridani
force-pushed
the
truffle-wide-path
branch
from
August 12, 2026 16:59
c926cef to
b732d6a
Compare
markos
reviewed
Aug 13, 2026
There was a problem hiding this comment.
Hi, thanks for the patch. Although you are correct about the optimization, I'm actually not very happy with how the SVE port is handled and I will be making heavy changes in this part of the code over the next months. I will defer merging this PR, until I figure out what's the best route to avoid this kind of single-arch optimizations -Wide Truffle seems to work only for SVE, which is something I should not have accepted in the first place. An optimization like that should be provided for all capable architectures, eg. AVX2/AVX512/etc. Or at least the proposal should leave open/unimplemented stubs for other architectures to be filled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default NEON path uses 3 pshufb and bit-ops, even though AArch64 has a 32-byte tbl. So, this PR fixes it. Also, blockSingleMaskWide uses vshlq_u8(vdupq_n(1), ...) instead of tbl. This gave a speedup of about 30%
Also, before in /internal/TruffleWide was a gate by HAVE_SVE instead of CAN_USE_WIDE_TRUFFLE.
Btw I also added
return nullptrin each branch withassert(false)to truffle_simd.hpp andtemplate SuperVector<16> SuperVector<16>::vshr_8_imm<5>() constinto impl.cpp.