[llvm] [APInt] Provide isqrt (floor of square root) instead of sqrt (rounded) (PR #197406)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu May 14 03:36:36 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;
----------------
arsenm wrote:
I agree that we should not retain dead code on the off chance of out of tree users
https://github.com/llvm/llvm-project/pull/197406
More information about the llvm-commits
mailing list