[llvm] [RISCV][CostModel] Updates reduction and shuffle cost (PR #77342)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 17:51:16 PST 2024
================
@@ -482,11 +481,10 @@ InstructionCost RISCVTTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
// vmsne.vi v0, v8, 0
return LT.first *
- (TLI->getLMULCost(LT.second) + // FIXME: this should be 1 for andi
----------------
arcbbb wrote:
For SK_Broadcast, my understanding is that the index should always be the first element of the source vector.
I was based on this
```
if (Shuffle->isZeroEltSplat())
return TargetTTI->getShuffleCost(TTI::SK_Broadcast, VecTy,
Shuffle->getShuffleMask(), CostKind, 0,
nullptr, Operands);
```
Could we clarify this?"
https://github.com/llvm/llvm-project/pull/77342
More information about the llvm-commits
mailing list