[llvm] [CostModel][X86] Attempt to match cheap v4f32 shuffles that map to SHUFPS instruction (PR #121778)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 08:37:44 PST 2025
================
@@ -2226,9 +2226,18 @@ InstructionCost X86TTIImpl::getShuffleCost(
{ TTI::SK_PermuteTwoSrc, MVT::v4f32, 2 }, // 2*shufps
};
- if (ST->hasSSE1())
+ if (ST->hasSSE1()) {
+ if (LT.first == 1 && LT.second == MVT::v4f32 && Mask.size() == 4) {
----------------
alexey-bataev wrote:
What if BaseTp element is not <4 x f32> and it is just promoted to MVT::v4f32, can it happen?
https://github.com/llvm/llvm-project/pull/121778
More information about the llvm-commits
mailing list