aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/KnownBitsTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/KnownBitsTest.cpp')
-rw-r--r--llvm/unittests/Support/KnownBitsTest.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/unittests/Support/KnownBitsTest.cpp b/llvm/unittests/Support/KnownBitsTest.cpp
index 48de088..027d637 100644
--- a/llvm/unittests/Support/KnownBitsTest.cpp
+++ b/llvm/unittests/Support/KnownBitsTest.cpp
@@ -553,17 +553,11 @@ TEST(KnownBitsTest, BinaryExhaustive) {
checkCorrectnessOnlyBinary);
testBinaryOpExhaustive(
KnownBits::mulhs,
- [](const APInt &N1, const APInt &N2) {
- unsigned Bits = N1.getBitWidth();
- return (N1.sext(2 * Bits) * N2.sext(2 * Bits)).extractBits(Bits, Bits);
- },
+ [](const APInt &N1, const APInt &N2) { return APIntOps::mulhs(N1, N2); },
checkCorrectnessOnlyBinary);
testBinaryOpExhaustive(
KnownBits::mulhu,
- [](const APInt &N1, const APInt &N2) {
- unsigned Bits = N1.getBitWidth();
- return (N1.zext(2 * Bits) * N2.zext(2 * Bits)).extractBits(Bits, Bits);
- },
+ [](const APInt &N1, const APInt &N2) { return APIntOps::mulhu(N1, N2); },
checkCorrectnessOnlyBinary);
}