-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[Intrinsics][AArch64] Add intrinsics for masking off aliasing vector lanes #117007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
f9e5a7c
071728f
80a72ca
daa2ac4
3fcb9e8
6628a98
0644542
75af361
5f563d9
24df6bf
ec37dfa
8d81955
8a09412
45cbaff
1b7b0da
0a0de88
54d32ad
2066929
9b3a71a
215d2e7
ec2bfed
9f5f91a
eb8d5af
c3d6fc8
9c5631d
52fca12
9a985ab
b09d354
56f9a6b
26bf362
a84e5e2
054f859
970e7f9
fddda14
36be558
c3d2acf
8af5019
558bc3e
32e0192
3d7c2da
5402e27
5075b5f
d85d375
4dedf42
33be150
587a25c
3abc7ba
8eb12a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -24126,8 +24126,9 @@ Overview: | |||||
""""""""" | ||||||
|
||||||
Given a vector load from %ptrA, followed by a vector store to %ptrB, this | ||||||
intrinsic generates a mask where a true lane indicates that the accesses don't | ||||||
overlap for that lane. | ||||||
intrinsic generates a mask where an active lane indicates that the accesses can | ||||||
be made safely without a lane being stored to before being read from. This can | ||||||
occur when the pointers alias within a vectorised loop iteration. | ||||||
|
||||||
A write-after-read hazard occurs when a write-after-read sequence for a given | ||||||
lane in a vector ends up being executed as a read-after-write sequence due to | ||||||
|
@@ -24146,13 +24147,12 @@ Semantics: | |||||
The intrinsic returns ``poison`` if the distance between ``%prtA`` and ``%ptrB`` | ||||||
is smaller than ``VF * %elementsize`` and either ``%ptrA + VF * %elementSize`` | ||||||
or ``%ptrB + VF * %elementSize`` wrap. | ||||||
The element of the result mask is active when no write-after-read hazard occurs, | ||||||
meaning that: | ||||||
The element of the result mask is active when loading from %ptrA then storing to | ||||||
%ptrB is safe and doesn't result in aliasing, meaning that: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done, thank you. |
||||||
|
||||||
* (ptrB - ptrA) <= 0 (guarantees that all lanes are loaded before any stores are | ||||||
committed), or | ||||||
* (ptrB - ptrA) <= 0 (guarantees that all lanes are loaded before any stores), or | ||||||
* (ptrB - ptrA) >= elementSize * lane (guarantees that this lane is loaded | ||||||
sdesmalen-arm marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
before the store to the same address is committed) | ||||||
before the store to the same address) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think committed is a term that is defined/used in LangRef. Would be goot to reframe this as well in general terms. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||
|
||||||
Examples: | ||||||
""""""""" | ||||||
|
@@ -24184,18 +24184,10 @@ This is an overloaded intrinsic. | |||||
Overview: | ||||||
""""""""" | ||||||
|
||||||
Given a scalar store to %ptrA, followed by a scalar load from %ptrB, this | ||||||
instruction generates a mask where an active lane indicates that there is no | ||||||
read-after-write hazard for this lane and that this lane does not introduce any | ||||||
new store-to-load forwarding hazard. | ||||||
|
||||||
A read-after-write hazard occurs when a read-after-write sequence for a given | ||||||
lane in a vector ends up being executed as a write-after-read sequence due to | ||||||
the aliasing of pointers. | ||||||
|
||||||
Note that the case where (ptrB - ptrA) < 0 does not result in any | ||||||
read-after-write hazards, but may introduce new store-to-load-forwarding stalls | ||||||
where both the store and load partially access the same addresses. | ||||||
Given a vector store to %ptrA, followed by a vector load from %ptrB, this | ||||||
instruction generates a mask where an active lane indicates that the accesses | ||||||
can be made safely without a lane being read from before being stored to. | ||||||
sdesmalen-arm marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
This can occur when the pointers alias within a vectorised loop iteration. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. store-to-load forwarding hazard is not defined. Do we need this wording here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The wording for the store-to-load forwarding (hazard) behaviour cannot be removed, because it is the only distinction between this intrinsic and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've re-added the hazard wording, thanks. |
||||||
|
||||||
Arguments: | ||||||
"""""""""" | ||||||
|
@@ -24210,11 +24202,11 @@ Semantics: | |||||
The intrinsic returns ``poison`` if the distance between ``%prtA`` and ``%ptrB`` | ||||||
is smaller than ``VF * %elementsize`` and either ``%ptrA + VF * %elementSize`` | ||||||
or ``%ptrB + VF * %elementSize`` wrap. | ||||||
The element of the result mask is active when no read-after-write hazard occurs, | ||||||
meaning that: | ||||||
The element of the result mask is active when storing to %ptrA then loading from | ||||||
%ptrB is safe and doesn't result in aliasing, meaning that: | ||||||
|
||||||
abs(ptrB - ptrA) >= elementSize * lane (guarantees that the store of this lane | ||||||
is committed before loading from this address) | ||||||
occurs before loading from this address) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The case for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||
|
||||||
Examples: | ||||||
""""""""" | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.