[PATCH] D103799: [CostModel] Express cost(urem) as cost(div+mul+sub) when set to Expand.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 14 14:38:36 PDT 2021


dmgreen added a comment.

This sounds OK to me, so long as the X86 numbers are not bonkers.



================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:788
+                                        LT.second)) {
+        unsigned DivOpc = (IsSigned ? Instruction::SDiv : Instruction::UDiv);
+        InstructionCost DivCost = thisT()->getArithmeticInstrCost(
----------------
I don't think you need the brackets here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103799/new/

https://reviews.llvm.org/D103799



More information about the llvm-commits mailing list