[llvm] [RISCV][TTI] Support fdiv/udiv/sdiv/srem/urem in getArithmeticInstrCost (PR #89170)

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 16:56:43 PDT 2024


================
@@ -1612,29 +1612,58 @@ InstructionCost RISCVTTIImpl::getArithmeticInstrCost(
   if (Op2Info.isConstant())
     ConstantMatCost += getConstantMatCost(1, Op2Info);
 
+  // Assuming instructions falling through the switch-cases have the same cost
----------------
arcbbb wrote:

Exactly! That captures what I was trying to convey.  Thank you!

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


More information about the llvm-commits mailing list