[llvm] ValueTracking: clarify isNotCrossLaneOperation (NFC) (PR #112375)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 08:09:40 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: Ramkumar Ramachandra (artagnon)
<details>
<summary>Changes</summary>
Clarify 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:
- (modified) llvm/include/llvm/Analysis/ValueTracking.h (+6-1)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/112375
More information about the llvm-commits
mailing list