OSDN Git Service

[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)
commit1f535d6428798057a2ce338aec034115c79be49e
tree048b0ce559f355a91935b7a6fa9f61c39d1754af
parentcfa38e7d1a85f36b0e027184deba89cff5f2ad39
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362304 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InlineCost.cpp
test/Transforms/Inline/ARM/inline-fp.ll