[llvm] [ARM]Adjust cost of muls in SMLAL patterns (PR #122713)
    David Green via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Mar 13 11:59:54 PDT 2025
    
    
  
================
@@ -1458,16 +1458,62 @@ InstructionCost ARMTTIImpl::getArithmeticInstrCost(
   if (LooksLikeAFreeShift())
     return 0;
 
+  // When targets have both DSP and MVE we find that the
----------------
davemgreen wrote:
Is it worth reducing the cost when we don't have MVE (but do have DSP) too? LLVM isn't great at trying to cost-model multiple instructions that can combine into one.  I think I would expect the mul to still have a cost, but the sext's to be free - I'm not sure if that would do better or worse in practice.
https://github.com/llvm/llvm-project/pull/122713
    
    
More information about the llvm-commits
mailing list