[llvm] [VPlan] Add VPValue::getWideType(VF), use to get vector ty (NFC) (PR #228250)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 04:44:45 PDT 2026


================
@@ -2482,13 +2476,12 @@ InstructionCost VPWidenMemIntrinsicRecipe::computeMemIntrinsicCost(
 InstructionCost
 VPWidenMemIntrinsicRecipe::computeCost(ElementCount VF,
                                        VPCostContext &Ctx) const {
-  Type *DataTy;
+  Type *Ty;
   if (auto DataPos = VPIntrinsic::getMemoryDataParamPos(getVectorIntrinsicID()))
-    DataTy = getOperand(*DataPos)->getScalarType();
+    Ty = getOperand(*DataPos)->getWideType(VF);
   else
-    DataTy = getScalarType();
-  assert(!DataTy->isVoidTy() && "Expected a non-void data type");
-  Type *Ty = toVectorTy(DataTy, VF);
+    Ty = getWideType(VF);
+  assert(!Ty->isVoidTy() && "Expected a non-void data type");
----------------
artagnon wrote:

Is this change non-functional?

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


More information about the llvm-commits mailing list