Skip to content

[Intrinsics][AArch64] Add intrinsics for masking off aliasing vector lanes#117007

Merged
SamTebbs33 merged 48 commits intollvm:mainfrom
SamTebbs33:alias-intrinsic
Sep 2, 2025
Merged

[Intrinsics][AArch64] Add intrinsics for masking off aliasing vector lanes#117007
SamTebbs33 merged 48 commits intollvm:mainfrom
SamTebbs33:alias-intrinsic

Conversation

@SamTebbs33
Copy link
Copy Markdown
Collaborator

@SamTebbs33 SamTebbs33 commented Nov 20, 2024

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.mask intrinsic represents cases where the store occurs after the load, and the opposite for loop.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.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.