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

Ryan Buchner via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 21:10:24 PDT 2026


================
@@ -1143,6 +1153,10 @@ class LLVM_ABI TargetTransformInfoImplBase {
     return true;
   }
 
+  virtual bool canSplatOperand(unsigned Opcode, int Operand) const {
+    return false;
+  }
----------------
bababuck wrote:

We don't have information about the user within `getShuffleCost` and `getVectorInstCost` so I think we need another TTI hook.

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


More information about the llvm-commits mailing list