diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-05-08 23:49:54 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-05-08 23:49:54 +0000 |
commit | 3369f8cc4ad20e2091629b78fbea7bc98f2079b0 (patch) | |
tree | de7862e5bfea4068684de5f78a6a9aeea44628a2 /llvm/lib/Support | |
parent | 24ae69515baf096b0fd1efa551f319e440283aed (diff) | |
download | bcm5719-llvm-3369f8cc4ad20e2091629b78fbea7bc98f2079b0.tar.gz bcm5719-llvm-3369f8cc4ad20e2091629b78fbea7bc98f2079b0.zip |
[APInt] Use default constructor instead of explicitly creating a 1-bit APInt in udiv and urem. NFC
The default constructor does the same thing.
llvm-svn: 302487
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 774fe86f106..c7685c3a730 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -1599,7 +1599,7 @@ APInt APInt::udiv(const APInt& RHS) const { return APInt(BitWidth, this->U.pVal[0] / RHS.U.pVal[0]); // We have to compute it the hard way. Invoke the Knuth divide algorithm. - APInt Quotient(1,0); // to hold result. + APInt Quotient; // to hold result. divide(*this, lhsWords, RHS, rhsWords, &Quotient, nullptr); return Quotient; } @@ -1646,7 +1646,7 @@ APInt APInt::urem(const APInt& RHS) const { return APInt(BitWidth, U.pVal[0] % RHS.U.pVal[0]); // We have to compute it the hard way. Invoke the Knuth divide algorithm. - APInt Remainder(1,0); + APInt Remainder; divide(*this, lhsWords, RHS, rhsWords, nullptr, &Remainder); return Remainder; } |