[llvm] [LoopVectorize] Add cost of generating tail-folding mask to the loop (PR #130565)
    Paul Walker via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Mar 19 04:15:46 PDT 2025
    
    
  
================
@@ -801,6 +801,22 @@ InstructionCost VPInstruction::computeCost(ElementCount VF,
                                   cast<VectorType>(VectorTy), Mask,
                                   Ctx.CostKind, VF.getKnownMinValue() - 1);
   }
+  case VPInstruction::ActiveLaneMask: {
+    Type *Arg0Ty = Ctx.Types.inferScalarType(getOperand(0));
+    Type *Arg1Ty = Ctx.Types.inferScalarType(getOperand(1));
----------------
paulwalker-arm wrote:
Given `get.active.lane.mask` requires both parameters to be the same type, do we need to calculate `Arg1Ty`?
https://github.com/llvm/llvm-project/pull/130565
    
    
More information about the llvm-commits
mailing list