[llvm] [ADT] Add implementations for avgFloor and avgCeil to APInt (PR #84431)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 10 22:57:35 PDT 2024
================
@@ -3094,3 +3094,35 @@ void llvm::LoadIntFromMemory(APInt &IntVal, const uint8_t *Src,
memcpy(Dst + sizeof(uint64_t) - LoadBytes, Src, LoadBytes);
}
}
+
+APInt APIntOps::avgFloorS(const APInt &C1, const APInt &C2) {
+ // Return floor((C1 + C2) /2))
----------------
topperc wrote:
`/2` -> `/ 2`
https://github.com/llvm/llvm-project/pull/84431
More information about the llvm-commits
mailing list