aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/KnownBitsTest.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2024-03-12 10:41:59 +0000
committerGitHub <noreply@github.com>2024-03-12 10:41:59 +0000
commit3358838446428976a41390fde98fe5b04b08a132 (patch)
treed8aa93a30611ef6e87dd6ff7a3972d6240333f74 /llvm/unittests/Support/KnownBitsTest.cpp
parent1b945e35a6a59fda436585f8fca12c82a27fc6a9 (diff)
downloadllvm-3358838446428976a41390fde98fe5b04b08a132.zip
llvm-3358838446428976a41390fde98fe5b04b08a132.tar.gz
llvm-3358838446428976a41390fde98fe5b04b08a132.tar.bz2
[ADT] Add APIntOps::abds signed absolute difference and rename absdiff -> abdu (#84791)
When I created APIntOps::absdiff, I totally missed that we already have ISD::ABDS/ABDU nodes, and we use this term in other places/targets as well. I've added the APIntOps::abds implementation and renamed APIntOps::absdiff to APIntOps::abdu. Given that APIntOps::absdiff is so young I don't think we need to create a deprecation wrapper, but I can if anyone thinks it important. I'll do a KnownBits rename patch after this.
Diffstat (limited to 'llvm/unittests/Support/KnownBitsTest.cpp')
-rw-r--r--llvm/unittests/Support/KnownBitsTest.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/unittests/Support/KnownBitsTest.cpp b/llvm/unittests/Support/KnownBitsTest.cpp
index 7c183e9..2ac25f0 100644
--- a/llvm/unittests/Support/KnownBitsTest.cpp
+++ b/llvm/unittests/Support/KnownBitsTest.cpp
@@ -361,9 +361,7 @@ TEST(KnownBitsTest, BinaryExhaustive) {
[](const KnownBits &Known1, const KnownBits &Known2) {
return KnownBits::absdiff(Known1, Known2);
},
- [](const APInt &N1, const APInt &N2) {
- return APIntOps::absdiff(N1, N2);
- },
+ [](const APInt &N1, const APInt &N2) { return APIntOps::abdu(N1, N2); },
checkCorrectnessOnlyBinary);
testBinaryOpExhaustive(
[](const KnownBits &Known1, const KnownBits &Known2) {