[llvm] 3e8a8fc - ValueTracking: clarify isNotCrossLaneOperation (NFC) (#112375)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 07:54:09 PST 2024
Author: Ramkumar Ramachandra
Date: 2024-11-04T15:54:06Z
New Revision: 3e8a8fce4aea14e7475c3ebf22227401e33bfe02
URL: https://github.com/llvm/llvm-project/commit/3e8a8fce4aea14e7475c3ebf22227401e33bfe02
DIFF: https://github.com/llvm/llvm-project/commit/3e8a8fce4aea14e7475c3ebf22227401e33bfe02.diff
LOG: ValueTracking: clarify isNotCrossLaneOperation (NFC) (#112375)
Clarify the distinction between lanewise operations, and operations that
do not cross vector lanes, with an example, in the header comment.
Added:
Modified:
llvm/include/llvm/Analysis/ValueTracking.h
Removed:
################################################################################
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
diff erent 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
More information about the llvm-commits
mailing list