[PATCH] D62699: [InlineCost] Add support for UnaryOperator

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 14:42:33 PDT 2019


craig.topper marked an inline comment as done.
craig.topper added inline comments.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:1131
+  // is expensive, this may eventually become a library call. Treat the cost
+  // as such.
+  if (I.getType()->isFloatingPointTy() &&
----------------
efriedma wrote:
> Is this actually true?  fneg should be one or two native instructions for almost every combination of type/target, even ones that don't have native floating-point support.
Probably not. But it is the answer we would have gotten for fsub -0.0, %x.  Should we exclude both forms of writing fneg from this?


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

https://reviews.llvm.org/D62699





More information about the llvm-commits mailing list