[llvm] [LV][EVL] Support interleaved access with tail folding by EVL (PR #152070)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 07:32:09 PDT 2025


================
@@ -3671,8 +3674,159 @@ void VPInterleaveRecipe::print(raw_ostream &O, const Twine &Indent,
 }
 #endif
 
-InstructionCost VPInterleaveRecipe::computeCost(ElementCount VF,
-                                                VPCostContext &Ctx) const {
+void VPInterleaveEVLRecipe::execute(VPTransformState &State) {
+  assert(!State.Lane && "Interleave group being replicated.");
+  assert(State.VF.isScalable() &&
+         "Only support scalable VF for EVL tail-folding.");
+  assert(!NeedsMaskForGaps &&
----------------
Mel-Chen wrote:

Oh no, I can’t believe it was relying on an invalid cost to prevent this.
https://github.com/llvm/llvm-project/pull/154122

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


More information about the llvm-commits mailing list