[PATCH] D121612: [VPlan] VPInterleaveRecipe only requires the first lane of the address.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 09:41:03 PDT 2022


fhahn created this revision.
fhahn added reviewers: Ayal, gilr, rengolin.
Herald added subscribers: tschuett, psnobl, rogfer01, bollu, hiraditya.
Herald added a project: All.
fhahn requested review of this revision.
Herald added a subscriber: vkmr.
Herald added a project: LLVM.

VPInterleaveRecipe only uses the first lane of the address. Add
onlyFirstLaneUsed implementation. This is needed for a follow-up patch.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121612

Files:
  llvm/lib/Transforms/Vectorize/VPlan.h


Index: llvm/lib/Transforms/Vectorize/VPlan.h
===================================================================
--- llvm/lib/Transforms/Vectorize/VPlan.h
+++ llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1461,6 +1461,13 @@
   unsigned getNumStoreOperands() const {
     return getNumOperands() - (HasMask ? 2 : 1);
   }
+
+  /// The recipe only uses the first lane of the address.
+  bool onlyFirstLaneUsed(const VPValue *Op) const override {
+    assert(is_contained(operands(), Op) &&
+           "Op must be an operand of the recipe");
+    return Op == getAddr();
+  }
 };
 
 /// A recipe to represent inloop reduction operations, performing a reduction on


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121612.415122.patch
Type: text/x-patch
Size: 658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220314/8a60bc38/attachment.bin>


More information about the llvm-commits mailing list