core_arch: redefine svrev, svzip and svuzp#2163
Merged
adamgemmell merged 2 commits intoJun 16, 2026
Merged
Conversation
Clang uses the `llvm.aarch64.sve.rev.bN` intrinsic for `svrev` with `b16`, `b32` and `b64`. This required small generator changes so it knew a bool-to-bool conversion was a no-op and a new blanket identity impl of `SveInto` so the calls generated compile.
Clang uses the `llvm.aarch64.sve.zip.bN` intrinsic for `svzip` with `b16`, `b32` and `b64` and the `llvm.aarch64.sve.uzp.bN` intrinsic for `svuzp` with the same types.
svrev_b{16,32,64}svrev, svzip and svuzp
20 tasks
adamgemmell
reviewed
Jun 16, 2026
| #[cfg_attr(target_arch = "aarch64", link_name = "llvm.vector.reverse.nxv8i1")] | ||
| fn _svrev_b16(op: svbool8_t) -> svbool8_t; | ||
| #[cfg_attr(target_arch = "aarch64", link_name = "llvm.aarch64.sve.rev.b16")] | ||
| fn _svrev_b16(op: svbool_t) -> svbool_t; |
Contributor
There was a problem hiding this comment.
Why the change away from lane-count-specific svbool types? I think LLVM still uses them
Member
Author
There was a problem hiding this comment.
I was getting a signature mismatch between the LLVM intrinsic and our signature here without this change.
Contributor
There was a problem hiding this comment.
Fair enough, this https://godbolt.org/z/8v1W7TnYq is little odd considering all the other intrinsics seem to use different lane counts for their predicates
adamgemmell
approved these changes
Jun 16, 2026
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.
Split out from #2160.
Clang uses the
llvm.aarch64.sve.rev.bNintrinsic forsvrevwithb16,b32andb64. Likewise withllvm.aarch64.sve.zip.bNforsvzipandllvm.aarch64.sve.uzp.bNforsvuzp. This required small generator changes so it knew a bool-to-bool conversion was a no-op and a new blanket identity impl ofSveIntoso the calls generated compile. These intrinsics were just returning the wrong value prior to this change, but obviously this isn't tested until #2160 lands.r? @adamgemmell