[llvm] [VPlan] Replace RdxDesc with RecurKind in VPReductionPHIRecipe (NFC). (PR #142322)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 1 02:14:46 PDT 2025


================
@@ -793,9 +791,9 @@ Value *VPInstruction::generate(VPTransformState &State) {
         if (RecurrenceDescriptor::isMinMaxRecurrenceKind(RK))
           ReducedPartRdx = createMinMaxOp(Builder, RK, ReducedPartRdx, RdxPart);
         else
-          ReducedPartRdx =
-              Builder.CreateBinOp((Instruction::BinaryOps)RdxDesc.getOpcode(),
-                                  RdxPart, ReducedPartRdx, "bin.rdx");
+          ReducedPartRdx = Builder.CreateBinOp(
+              (Instruction::BinaryOps)RecurrenceDescriptor::getOpcode(RK),
----------------
artagnon wrote:

Change this C-style cast to a static_cast?

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


More information about the llvm-commits mailing list