Skip to content

Commit 3e8a8fc

Browse files
authored
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.
1 parent 9a211fe commit 3e8a8fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/include/llvm/Analysis/ValueTracking.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,12 @@ bool onlyUsedByLifetimeMarkers(const Value *V);
791791
/// droppable instructions.
792792
bool onlyUsedByLifetimeMarkersOrDroppableInsts(const Value *V);
793793

794-
/// Return true if the instruction doesn't potentially cross vector lanes.
794+
/// Return true if the instruction doesn't potentially cross vector lanes. This
795+
/// condition is weaker than checking that the instruction is lanewise: lanewise
796+
/// means that the same operation is splatted across all lanes, but we also
797+
/// include the case where there is a different operation on each lane, as long
798+
/// as the operation only uses data from that lane. An example of an operation
799+
/// that is not lanewise, but doesn't cross vector lanes is insertelement.
795800
bool isNotCrossLaneOperation(const Instruction *I);
796801

797802
/// Return true if the instruction does not have any effects besides

0 commit comments

Comments
 (0)