[llvm] [ADT] Add APIntOps::abds signed absolute difference and rename absdiff -> abdu (PR #84791)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 09:59:08 PDT 2024


================
@@ -362,7 +362,7 @@ TEST(KnownBitsTest, BinaryExhaustive) {
         return KnownBits::absdiff(Known1, Known2);
       },
       [](const APInt &N1, const APInt &N2) {
-        return APIntOps::absdiff(N1, N2);
+        return APIntOps::abdu(N1, N2);
       },
----------------
RKSimon wrote:

Yes, we can do that - the KnownBits function as well in many cases - although we've tended to keep the lambdas for all cases so far (smin/smax  etc. above) - I have no strong preference.

https://github.com/llvm/llvm-project/pull/84791


More information about the llvm-commits mailing list