[llvm] ValueTracking: clarify isNotCrossLaneOperation (NFC) (PR #112375)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 08:09:06 PDT 2024
https://github.com/artagnon created https://github.com/llvm/llvm-project/pull/112375
Clarify the distinction between lanewise operations, and operations that do not cross vector lanes, with an example, in the header comment.
>From 4f3985a860d66fa7b3431668f03b8490b1eeff79 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
Date: Tue, 15 Oct 2024 16:06:05 +0100
Subject: [PATCH] ValueTracking: clarify isNotCrossLaneOperation (NFC)
Clarify the distinction between lanewise operations, and operations that
do not cross vector lanes, with an example, in the header comment.
---
llvm/include/llvm/Analysis/ValueTracking.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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
More information about the llvm-commits
mailing list