[llvm] r306227 - [PatternMatch] Use ConstantFP::isNan instead of getting the APFloat and calling isNaN on that. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 24 15:59:12 PDT 2017
Author: ctopper
Date: Sat Jun 24 15:59:11 2017
New Revision: 306227
URL: http://llvm.org/viewvc/llvm-project?rev=306227&view=rev
Log:
[PatternMatch] Use ConstantFP::isNan instead of getting the APFloat and calling isNaN on that. NFC
Modified:
llvm/trunk/include/llvm/IR/PatternMatch.h
Modified: llvm/trunk/include/llvm/IR/PatternMatch.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/PatternMatch.h?rev=306227&r1=306226&r2=306227&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/PatternMatch.h (original)
+++ llvm/trunk/include/llvm/IR/PatternMatch.h Sat Jun 24 15:59:11 2017
@@ -167,10 +167,8 @@ inline match_combine_or<match_zero, matc
struct match_nan {
template <typename ITy> bool match(ITy *V) {
- if (const auto *C = dyn_cast<ConstantFP>(V)) {
- const APFloat &APF = C->getValueAPF();
- return APF.isNaN();
- }
+ if (const auto *C = dyn_cast<ConstantFP>(V))
+ return C->isNaN();
return false;
}
};
More information about the llvm-commits
mailing list