-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
ValueTracking: clarify isNotCrossLaneOperation (NFC) #112375
Conversation
Clarify the distinction between lanewise operations, and operations that do not cross vector lanes, with an example, in the header comment.
@llvm/pr-subscribers-llvm-analysis Author: Ramkumar Ramachandra (artagnon) ChangesClarify the distinction between lanewise operations, and operations that do not cross vector lanes, with an example, in the header comment. Full diff: https://github.com/llvm/llvm-project/pull/112375.diff 1 Files Affected:
diff --git a/llvm/include/llvm/Analysis/ValueTracking.h b/llvm/include/llvm/Analysis/ValueTracking.h
index 0c6ebf87b29232..2b0377903ac8e3 100644
--- a/llvm/include/llvm/Analysis/ValueTracking.h
+++ b/llvm/include/llvm/Analysis/ValueTracking.h
@@ -791,7 +791,12 @@ bool onlyUsedByLifetimeMarkers(const Value *V);
/// droppable instructions.
bool onlyUsedByLifetimeMarkersOrDroppableInsts(const Value *V);
-/// Return true if the instruction doesn't potentially cross vector lanes.
+/// Return true if the instruction doesn't potentially cross vector lanes. This
+/// condition is weaker than checking that the instruction is lanewise: lanewise
+/// means that the same operation is splatted across all lanes, but we also
+/// include the case where there is a different operation on each lane, as long
+/// as the operation only uses data from that lane. An example of an operation
+/// that is not lanewise, but doesn't cross vector lanes is insertelement.
bool isNotCrossLaneOperation(const Instruction *I);
/// Return true if the instruction does not have any effects besides
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please also wait on @preames.
Gentle ping. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Clarify the distinction between lanewise operations, and operations that do not cross vector lanes, with an example, in the header comment.
Clarify the distinction between lanewise operations, and operations that do not cross vector lanes, with an example, in the header comment.