[llvm] ValueTracking: introduce llvm::isNotCrossLaneOperation (PR #112011)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 13 12:11:13 PDT 2024


================
@@ -791,6 +791,10 @@ bool onlyUsedByLifetimeMarkers(const Value *V);
 /// droppable instructions.
 bool onlyUsedByLifetimeMarkersOrDroppableInsts(const Value *V);
 
+/// Return true if the instruction doesn't potentially cross vector lanes. This
+/// is useful to make GVN-replacements for vector types.
----------------
nikic wrote:

```suggestion
/// is useful when optimizing based on vector conditions.
```
Though TBH I'd just leave off the second sentence, I don't think it is helpful without a significantly more detailed explanation.

https://github.com/llvm/llvm-project/pull/112011


More information about the llvm-commits mailing list