OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96479ad
)
[PatternMatch] Use ConstantFP::isNan instead of getting the APFloat and calling isNaN...
author
Craig Topper
<craig.topper@gmail.com>
Sat, 24 Jun 2017 22:59:11 +0000
(22:59 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Sat, 24 Jun 2017 22:59:11 +0000
(22:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306227
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/IR/PatternMatch.h
patch
|
blob
|
history
diff --git
a/include/llvm/IR/PatternMatch.h
b/include/llvm/IR/PatternMatch.h
index
7a3ba10
..
cd1d80a
100644
(file)
--- a/
include/llvm/IR/PatternMatch.h
+++ b/
include/llvm/IR/PatternMatch.h
@@
-167,10
+167,8
@@
inline match_combine_or<match_zero, match_neg_zero> m_AnyZero() {
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;
}
};