Skip to content

Commit

Permalink
ValueTracking: clarify isNotCrossLaneOperation (NFC) (#112375)
Browse files Browse the repository at this point in the history
Clarify the distinction between lanewise operations, and operations that
do not cross vector lanes, with an example, in the header comment.
  • Loading branch information
artagnon authored Nov 4, 2024
1 parent 9a211fe commit 3e8a8fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion llvm/include/llvm/Analysis/ValueTracking.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e8a8fc

Please sign in to comment.