[PATCH] D78547: [TTI] getUserCost to return getCastInstrCost

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 00:30:14 PDT 2020


samparker updated this revision to Diff 263632.
samparker added a comment.

This now looks like an NFC with the bitcasts fixed, but I strongly suspect that some backends will need tweaking when D78922 <https://reviews.llvm.org/D78922> is in too.


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

https://reviews.llvm.org/D78547

Files:
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h


Index: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
===================================================================
--- llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
+++ llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
@@ -872,10 +872,7 @@
     case Instruction::PtrToInt:
     case Instruction::Trunc:
     case Instruction::BitCast:
-      if (TargetTTI->getCastInstrCost(Opcode, Ty, OpTy, CostKind, I) ==
-          TTI::TCC_Free)
-        return TTI::TCC_Free;
-      break;
+      return TargetTTI->getCastInstrCost(Opcode, Ty, OpTy, CostKind, I);
     case Instruction::FPExt:
     case Instruction::SExt:
     case Instruction::ZExt:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78547.263632.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200513/14d3d630/attachment.bin>


More information about the llvm-commits mailing list