diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-05-10 18:15:17 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-05-10 18:15:17 +0000 |
commit | f86b9d5063f89b9689431bf07aa6fe9e08172d17 (patch) | |
tree | 3228abf2de5bd65307bb199343ec43566793267c /llvm/lib/Support/APInt.cpp | |
parent | 93eabae4aa89d49be3c89b16a7bf8842a64c32c0 (diff) | |
download | bcm5719-llvm-f86b9d5063f89b9689431bf07aa6fe9e08172d17.tar.gz bcm5719-llvm-f86b9d5063f89b9689431bf07aa6fe9e08172d17.zip |
[APInt] Use getRawData to slightly simplify some code.
llvm-svn: 302702
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-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 7559e46a3c2..9bf9b4cd2e6 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -1431,7 +1431,7 @@ void APInt::divide(const APInt &LHS, unsigned lhsWords, const APInt &RHS, // Initialize the dividend memset(U, 0, (m+n+1)*sizeof(unsigned)); for (unsigned i = 0; i < lhsWords; ++i) { - uint64_t tmp = (LHS.getNumWords() == 1 ? LHS.U.VAL : LHS.U.pVal[i]); + uint64_t tmp = LHS.getRawData()[i]; U[i * 2] = (unsigned)(tmp & mask); U[i * 2 + 1] = (unsigned)(tmp >> (sizeof(unsigned)*CHAR_BIT)); } @@ -1440,7 +1440,7 @@ void APInt::divide(const APInt &LHS, unsigned lhsWords, const APInt &RHS, // Initialize the divisor memset(V, 0, (n)*sizeof(unsigned)); for (unsigned i = 0; i < rhsWords; ++i) { - uint64_t tmp = (RHS.getNumWords() == 1 ? RHS.U.VAL : RHS.U.pVal[i]); + uint64_t tmp = RHS.getRawData()[i]; V[i * 2] = (unsigned)(tmp & mask); V[i * 2 + 1] = (unsigned)(tmp >> (sizeof(unsigned)*CHAR_BIT)); } |