[InlineCost] Don't add the soft float function call cost for the fneg idiom, fsub...
authorCraig Topper <craig.topper@intel.com>
Sat, 1 Jun 2019 19:40:07 +0000 (19:40 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 1 Jun 2019 19:40:07 +0000 (19:40 +0000)
commit7cebf0af4076c7d198ef8ef90b79d1ff422a42cd
tree525e928b02d880c35c6bf0972e4945b0cca81b86
parentcd1878d0f957f72e34b378d25742dbc886f079bc
[InlineCost] Don't add the soft float function call cost for the fneg idiom, fsub -0.0, %x

Summary: Fneg can be implemented with an xor rather than a function call so we don't need to add the function call overhead. This was pointed out in D62699

Reviewers: efriedma, cameron.mcinally

Reviewed By: efriedma

Subscribers: javed.absar, eraman, hiraditya, haicheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62747

llvm-svn: 362304
llvm/lib/Analysis/InlineCost.cpp
llvm/test/Transforms/Inline/ARM/inline-fp.ll