[llvm-branch-commits] [llvm] [SLP] Pass a lane as the vector cost context only if all lanes agree (PR #241758)
Alexey Bataev via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Nov 12 03:13:00 PST 2026
================
@@ -16676,6 +16676,26 @@ static std::optional<unsigned> getCastOpcodeForDemotedOperand(unsigned Opcode,
}
}
+/// Returns \p Cost with \p Repr as the context if every lane of \p VL that
+/// \p Repr represents gives the same cost as its context, and \p Cost without
+/// a context otherwise.
+static InstructionCost getCostInAgreedContext(
----------------
alexey-bataev wrote:
Not SLP problem, but your TTI cost problem. This analysis should be a part of TTI, not SLP. If you need knowledge about actual scalars - pass these scalars to TTI and do this analysis there, not in SLP
https://github.com/llvm/llvm-project/pull/241758
More information about the llvm-branch-commits
mailing list