[llvm] [APInt] Provide sqrtFloor (floor of square root) instead of sqrt (rounded) (PR #197406)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 08:04:46 PDT 2026


================
@@ -1809,8 +1809,8 @@ class [[nodiscard]] APInt {
     return logBase2();
   }
 
-  /// Compute the square root.
-  LLVM_ABI APInt sqrt() const;
+  /// Compute the floor of the square root of the unsigned value.
+  LLVM_ABI APInt isqrt() const;
----------------
jayfoad wrote:

Done

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


More information about the llvm-commits mailing list