[llvm] [APInt] Introduce signed-gcd APIntOps (PR #217269)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 11:46:26 PDT 2026


================
@@ -2339,6 +2339,9 @@ LLVM_ABI APInt pow(const APInt &X, int64_t N);
 /// \returns the greatest common divisor of A and B.
 LLVM_ABI APInt GreatestCommonDivisor(APInt A, APInt B);
 
+/// Compute GCD of two signed APInt values.
----------------
nikic wrote:

This should explain the semantics of the operation.

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


More information about the llvm-commits mailing list