[llvm] [VPlan] Add VPInstruction::StepVector and use it in VPWidenIntOrFpInductionRecipe (PR #129508)
    Florian Hahn via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Apr 28 06:24:32 PDT 2025
    
    
  
================
@@ -1068,7 +1070,15 @@ class VPInstructionWithType : public VPInstruction {
     if (R->isScalarCast())
       return true;
     auto *VPI = dyn_cast<VPInstruction>(R);
-    return VPI && VPI->getOpcode() == VPInstruction::WideIVStep;
+    if (!VPI)
+      return false;
+    switch (VPI->getOpcode()) {
+    case VPInstruction::WideIVStep:
----------------
fhahn wrote:
I think the switch is just to match multiple opcodes more easily; not sure if it makes sense to have a separate patch to add a switch for a single opcode first; could also just  add `|| VPI->getOpcode() == VPInstruction::StepVector`
https://github.com/llvm/llvm-project/pull/129508
    
    
More information about the llvm-commits
mailing list