summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-01 21:50:03 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-01 21:50:03 +0000
commitb2aaa5da427c78ad14a82ce07c4e8bcd4032af86 (patch)
tree91fd5539e9d27570ff8b8e3be506e254473ede2b /llvm/lib/Support/APInt.cpp
parentd143a0c2de1311575633de3c6a3f55b101889229 (diff)
downloadbcm5719-llvm-b2aaa5da427c78ad14a82ce07c4e8bcd4032af86.tar.gz
bcm5719-llvm-b2aaa5da427c78ad14a82ce07c4e8bcd4032af86.zip
[APInt] Implement AndAssignSlowCase using tcAnd. Do the same for Or and Xor. NFCI
llvm-svn: 299317
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r--llvm/lib/Support/APInt.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 0d4255da7f0..4275e3918c6 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -407,23 +407,17 @@ APInt& APInt::operator*=(const APInt& RHS) {
}
APInt& APInt::AndAssignSlowCase(const APInt& RHS) {
- unsigned numWords = getNumWords();
- for (unsigned i = 0; i < numWords; ++i)
- pVal[i] &= RHS.pVal[i];
+ tcAnd(pVal, RHS.pVal, getNumWords());
return *this;
}
APInt& APInt::OrAssignSlowCase(const APInt& RHS) {
- unsigned numWords = getNumWords();
- for (unsigned i = 0; i < numWords; ++i)
- pVal[i] |= RHS.pVal[i];
+ tcOr(pVal, RHS.pVal, getNumWords());
return *this;
}
APInt& APInt::XorAssignSlowCase(const APInt& RHS) {
- unsigned numWords = getNumWords();
- for (unsigned i = 0; i < numWords; ++i)
- pVal[i] ^= RHS.pVal[i];
+ tcXor(pVal, RHS.pVal, getNumWords());
return *this;
}
OpenPOWER on IntegriCloud