[PATCH] D56907: [TTI] Add generic USUBSAT costs

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 19 01:58:42 PST 2019


nikic added inline comments.


================
Comment at: include/llvm/CodeGen/BasicTTIImpl.h:1278
+      Cost += ConcreteTTI->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy,
+                                              CondTy, nullptr);
+      Cost += ConcreteTTI->getCmpSelInstrCost(BinaryOperator::Select, RetTy,
----------------
RKSimon wrote:
> nikic wrote:
> > Should we omit the icmp cost for the scalar case, on the assumption that it will be handled as an overflow flag instead?
> Maybe just add those as x86 entries for now unless you want to add cost support for add/sub overflow/carry intrinsics as well?
Having X86 entries would be fine as well, though I think that the availability of overflow flags for scalar add/sub is a reasonable enough assumption to make even for the generic cost model.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56907





More information about the llvm-commits mailing list