[llvm] [ADT] Add implementations for avgFloor and ceilFloor to APInt (PR #84431)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 8 02:04:45 PST 2024


================
@@ -2193,6 +2193,18 @@ inline const APInt absdiff(const APInt &A, const APInt &B) {
   return A.uge(B) ? (A - B) : (B - A);
 }
 
+///.Compute the signed floor of the average of C1 and C2
----------------
jayfoad wrote:

It is the average that is signed or unsigned, not the floor. So the comment should be "Compute the floor of the signed average of C1 and C2". Similarly for the others.

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


More information about the llvm-commits mailing list