[llvm] [VPlan] Port invalid cost remarks to VPlan. (PR #99322)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 07:25:28 PDT 2024


================
@@ -4374,33 +4395,57 @@ static void emitInvalidCostRemarks(SmallVector<InstructionVFPair> InvalidCosts,
   // Group the instructions together to emit separate remarks for:
   //   load  (vf1, vf2)
   //   store (vf1)
-  auto Tail = ArrayRef<InstructionVFPair>(InvalidCosts);
-  auto Subset = ArrayRef<InstructionVFPair>();
+  auto Tail = ArrayRef<RecipeVFPair>(InvalidCosts);
+  auto Subset = ArrayRef<RecipeVFPair>();
   do {
     if (Subset.empty())
       Subset = Tail.take_front(1);
 
-    Instruction *I = Subset.front().first;
+    VPRecipeBase *R = Subset.front().first;
+
+    unsigned Opcode =
+        TypeSwitch<const VPRecipeBase *, unsigned>(R)
----------------
ayalz wrote:

Are all cases handled, default deemed unreachable?

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


More information about the llvm-commits mailing list