[Intrinsics][AArch64] Add intrinsics for masking off aliasing vector lanes#117007
Merged
SamTebbs33 merged 48 commits intollvm:mainfrom Sep 2, 2025
Merged
[Intrinsics][AArch64] Add intrinsics for masking off aliasing vector lanes#117007SamTebbs33 merged 48 commits intollvm:mainfrom
SamTebbs33 merged 48 commits intollvm:mainfrom
Conversation
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.
It can be unsafe to load a vector from an address and write a vector to an address if those two addresses have overlapping lanes within a vectorised loop iteration.
This PR adds intrinsics designed to create a mask with lanes disabled if they overlap between the two pointer arguments, so that only safe lanes are loaded, operated on and stored. The
loop.dependence.war.maskintrinsic represents cases where the store occurs after the load, and the opposite forloop.dependence.raw.mask. The distinction between write-after-read and read-after-write is important, since the ordering of the read and write operations affects if the chain of those instructions can be done safely.Along with the two pointer parameters, the intrinsics also take an immediate that represents the size in bytes of the vector element types.
This will be used by #100579.