diff options
author | Jay Foad <jay.foad@amd.com> | 2020-03-06 15:22:11 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@amd.com> | 2020-03-06 16:42:53 +0000 |
commit | 11d1573bb6688d71c7f9183e084776cf8067c0fd (patch) | |
tree | 95f4b384213c74a0fe8cc0d1d4d3aceffa9db00f /llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | |
parent | 6c61edcbab1ccfe456a1cade499a3c48d43c616f (diff) | |
download | llvm-11d1573bb6688d71c7f9183e084776cf8067c0fd.zip llvm-11d1573bb6688d71c7f9183e084776cf8067c0fd.tar.gz llvm-11d1573bb6688d71c7f9183e084776cf8067c0fd.tar.bz2 |
[APFloat] Make use of new overloaded comparison operators. NFC.
Reviewers: ekatz, spatel, jfb, tlively, craig.topper, RKSimon, nikic, scanon
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, dexonsmith, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75744
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp index a6f0db3..4443c391 100644 --- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -1745,7 +1745,7 @@ Value *LibCallSimplifier::optimizePow(CallInst *Pow, IRBuilderBase &B) { // be different) and it should also consider optimizing for size. APFloat LimF(ExpoF->getSemantics(), 33), ExpoA(abs(*ExpoF)); - if (ExpoA.compare(LimF) == APFloat::cmpLessThan) { + if (ExpoA < LimF) { // This transformation applies to integer or integer+0.5 exponents only. // For integer+0.5, we create a sqrt(Base) call. Value *Sqrt = nullptr; |