[llvm] [ADT] Add signed and unsigned mulHi and mulLo to APInt (PR #84719)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 03:48:47 PDT 2024


================
@@ -2193,6 +2193,18 @@ inline const APInt absdiff(const APInt &A, const APInt &B) {
   return A.uge(B) ? (A - B) : (B - A);
 }
 
+/// Return the high bits of the signed multiplication of C1 and C2
+APInt mulHiS(const APInt &C1, const APInt &C2);
+
+/// Return the high bits of the unsigned multiplication of C1 and C2
+APInt mulHiU(const APInt &C1, const APInt &C2);
+
+/// Return the low bits of the signed multiplication of C1 and C2
+APInt mulLoS(const APInt &C1, const APInt &C2);
+
+/// Return the low bits of the unsigned multiplication of C1 and C2
+APInt mulLoU(const APInt &C1, const APInt &C2);
----------------
RKSimon wrote:

These are just mul - which we already have - remove them

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


More information about the llvm-commits mailing list