From: Craig Topper Date: Sat, 24 Jun 2017 22:59:11 +0000 (+0000) Subject: [PatternMatch] Use ConstantFP::isNan instead of getting the APFloat and calling isNaN... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=456b664433f4708bc97ca0630caef1c354d56214;p=llvm [PatternMatch] Use ConstantFP::isNan instead of getting the APFloat and calling isNaN on that. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306227 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/PatternMatch.h b/include/llvm/IR/PatternMatch.h index 7a3ba1039e9..cd1d80a35cc 100644 --- a/include/llvm/IR/PatternMatch.h +++ b/include/llvm/IR/PatternMatch.h @@ -167,10 +167,8 @@ inline match_combine_or m_AnyZero() { struct match_nan { template bool match(ITy *V) { - if (const auto *C = dyn_cast(V)) { - const APFloat &APF = C->getValueAPF(); - return APF.isNaN(); - } + if (const auto *C = dyn_cast(V)) + return C->isNaN(); return false; } };