[PATCH] D86525: [ARM][CostModel] CodeSize costs for i1 arith ops

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 01:24:28 PDT 2020


SjoerdMeijer accepted this revision.
SjoerdMeijer added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:1043
+  int ISDOpcode = TLI->InstructionOpcodeToISD(Opcode);
+  if (ST->isThumb() && CostKind == TTI::TCK_CodeSize && Ty->isIntegerTy(1)) {
+    // Make operations on i1 relatively expensive as this often involves
----------------
samparker wrote:
> SjoerdMeijer wrote:
> > I was wondering if this should be ST->isThumb2() perhaps? Or does it not matter, this didn't show unexpected regressions?
> I've included Thumb too because these operations would be even more expensive without IT support. There were some cases of increases in code size, see D86526, but overall this is a win.
Ah yes, cheers, makes sense. LGTM


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86525



More information about the llvm-commits mailing list