diff options
author | Matthias Braun <matze@braunis.de> | 2016-02-15 20:06:19 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-02-15 20:06:19 +0000 |
commit | 5117fcdec24454dd8c896a69d15dc1ce870ea7c7 (patch) | |
tree | b01fbe6759a6447492d3bdf33f25d030c6e8212e | |
parent | b6bdfc522ccf8f42b1564aec7c71a876ec585ad5 (diff) | |
download | bcm5719-llvm-5117fcdec24454dd8c896a69d15dc1ce870ea7c7.tar.gz bcm5719-llvm-5117fcdec24454dd8c896a69d15dc1ce870ea7c7.zip |
APInt: Further simplify APInt::EqualSlowCase as suggested by Duncan
llvm-svn: 260910
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index af95aad1824..86fde19192b 100644 --- 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 { |