[PATCH] D149081: [VPlan] Add VPWidenCastRecipe, split off from VPWidenRecipe (NFCI).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 13:44:41 PDT 2023


fhahn marked 6 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:57-64
   case VPWidenIntOrFpInductionSC:
   case VPWidenCanonicalIVSC:
   case VPWidenPHISC:
   case VPBlendSC:
   case VPWidenSC:
+  case VPWidenCastSC:
   case VPWidenGEPSC:
----------------
Ayal wrote:
> 
Existing order fixed in 1b05e7498224


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:91-98
   case VPWidenIntOrFpInductionSC:
   case VPWidenCanonicalIVSC:
   case VPWidenPHISC:
   case VPBlendSC:
   case VPWidenSC:
+  case VPWidenCastSC:
   case VPWidenGEPSC:
----------------
Ayal wrote:
> 
Existing order fixed in 1b05e7498224


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:128-139
   case VPWidenIntOrFpInductionSC:
   case VPFirstOrderRecurrencePHISC:
   case VPWidenPointerInductionSC:
   case VPWidenCanonicalIVSC:
   case VPWidenPHISC:
   case VPBlendSC:
   case VPWidenSC:
----------------
Ayal wrote:
> 
Existing order fixed in 1b05e7498224


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:706
+  /// Vectorize casts.
+  Type *DestTy = (State.VF.isScalar())
+                     ? getResultType()
----------------
Ayal wrote:
> Is this (or the original) Widen recipe built also for scalar VF? (Independent of this patch)
No, will replace this with an assert in the original code.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:721
+                              VPSlotTracker &SlotTracker) const {
+  O << Indent << "WIDEN ";
+  printAsOperand(O, SlotTracker);
----------------
Ayal wrote:
> nit: worth printing WIDEN CAST? Differs from WIDEN by the "to" result type anyhow.
> 
> No current VPlan-printing tests are affected? Should be added?
Adjusted. There are already existing tests which show the change now


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149081/new/

https://reviews.llvm.org/D149081



More information about the llvm-commits mailing list