[llvm] [SLP] More accurately cost RISCV scalar splats (PR #213104)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 05:12:43 PDT 2026


================
@@ -3594,6 +3609,31 @@ bool RISCVTTIImpl::canSplatOperand(Instruction *I, int Operand) const {
   }
 }
 
+TargetTransformInfo::VectorInstrContext RISCVTTIImpl::getBuildVectorContextHint(
+    ArrayRef<int> Mask, ArrayRef<Value *> Scalars,
+    function_ref<bool(SmallVectorImpl<TargetTransformInfo::BuildVectorUseOp> &)>
+        GatherUseOps) const {
----------------
alexey-bataev wrote:

Number of users is not a criteria, target specific is criteria. There are lots of InstCombiner, LV, SLP -only related entries, only target-relation

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


More information about the llvm-commits mailing list