[llvm] [RISCV][CostModel] Updates reduction and shuffle cost (PR #77342)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 20:02:54 PST 2024


================
@@ -531,9 +529,12 @@ InstructionCost RISCVTTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
     if (LT.second.isFixedLengthVector())
       // vrsub.vi has a 5 bit immediate field, otherwise an li suffices
       LenCost = isInt<5>(LT.second.getVectorNumElements() - 1) ? 0 : 1;
-    // FIXME: replace the constant `2` below with cost of {VID_V,VRSUB_VX}
+    unsigned Opcodes[] = {RISCV::VID_V, RISCV::VRSUB_VX, RISCV : VRGATHER_VV};
----------------
lukel97 wrote:

@preames I can't see where LenCost is changed in this branch. I think you might be looking at an earlier version of the diff before this force push? https://github.com/llvm/llvm-project/commit/62be3d6f1b95b0554a1ae0b248f3c5065b9bbba2



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


More information about the llvm-commits mailing list