[llvm] [RISCV][CostModel] Correct the cost of some reductions (PR #118072)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 09:35:04 PST 2024


================
@@ -1470,27 +1470,27 @@ RISCVTTIImpl::getMinMaxReductionCost(Intrinsic::ID IID, VectorType *Ty,
     llvm_unreachable("Unsupported intrinsic");
   case Intrinsic::smax:
     SplitOp = RISCV::VMAX_VV;
-    Opcodes = {RISCV::VMV_S_X, RISCV::VREDMAX_VS, RISCV::VMV_X_S};
+    Opcodes = {RISCV::VREDMAX_VS, RISCV::VMV_X_S};
----------------
preames wrote:

Oh, so we only removed it for the ones where the start wasn't required.  I hadn't noticed that e.g. ADD wasn't changed.  Make sense - though the comment could definitely be clearer on this point.

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


More information about the llvm-commits mailing list