diff options
author | Jay Foad <jay.foad@gmail.com> | 2019-07-24 12:50:10 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2019-07-24 12:50:10 +0000 |
commit | 565c54320e009911479a0bdb58185a9d97c2c815 (patch) | |
tree | 6bd24717fc339daa301130f8f24991d9836a110f /llvm/lib/Analysis/InlineCost.cpp | |
parent | 362407442690952812a9062d4d693d45705bf189 (diff) | |
download | llvm-565c54320e009911479a0bdb58185a9d97c2c815.zip llvm-565c54320e009911479a0bdb58185a9d97c2c815.tar.gz llvm-565c54320e009911479a0bdb58185a9d97c2c815.tar.bz2 |
[InstSimplify] Rename SimplifyFPUnOp and SimplifyFPBinOp
Summary:
SimplifyFPBinOp is a variant of SimplifyBinOp that lets you specify
fast math flags, but the name is misleading because both functions
can simplify both FP and non-FP ops. Instead, overload SimplifyBinOp
so that you can optionally specify fast math flags.
Likewise for SimplifyFPUnOp.
Reviewers: spatel
Reviewed By: spatel
Subscribers: xbolva00, cameron.mcinally, eraman, hiraditya, haicheng, zzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64902
llvm-svn: 366902
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 0dec146..c6e5c1c 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -1070,8 +1070,8 @@ bool CallAnalyzer::visitBinaryOperator(BinaryOperator &I) { Value *SimpleV = nullptr; if (auto FI = dyn_cast<FPMathOperator>(&I)) - SimpleV = SimplifyFPBinOp(I.getOpcode(), CLHS ? CLHS : LHS, - CRHS ? CRHS : RHS, FI->getFastMathFlags(), DL); + SimpleV = SimplifyBinOp(I.getOpcode(), CLHS ? CLHS : LHS, + CRHS ? CRHS : RHS, FI->getFastMathFlags(), DL); else SimpleV = SimplifyBinOp(I.getOpcode(), CLHS ? CLHS : LHS, CRHS ? CRHS : RHS, DL); |