projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6bdfc5
)
APInt: Further simplify APInt::EqualSlowCase as suggested by Duncan
author
Matthias Braun
<matze@braunis.de>
Mon, 15 Feb 2016 20:06:19 +0000
(20:06 +0000)
committer
Matthias Braun
<matze@braunis.de>
Mon, 15 Feb 2016 20:06:19 +0000
(20:06 +0000)
llvm-svn: 260910
llvm/lib/Support/APInt.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/APInt.cpp
b/llvm/lib/Support/APInt.cpp
index
af95aad
..
86fde19
100644
(file)
--- a/
llvm/lib/Support/APInt.cpp
+++ b/
llvm/lib/Support/APInt.cpp
@@
-490,10
+490,7
@@
APInt APInt::operator-(const APInt& RHS) const {
}
bool APInt::EqualSlowCase(const APInt& RHS) const {
- for (unsigned I = 0, NumWords = getNumWords(); I < NumWords; ++I)
- if (pVal[I] != RHS.pVal[I])
- return false;
- return true;
+ return std::equal(pVal, pVal + getNumWords(), RHS.pVal);
}
bool APInt::EqualSlowCase(uint64_t Val) const {