[llvm] add power function to APInt (PR #122788)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 09:11:05 PST 2025


================
@@ -2263,6 +2263,10 @@ APInt mulhs(const APInt &C1, const APInt &C2);
 /// Returns the high N bits of the multiplication result.
 APInt mulhu(const APInt &C1, const APInt &C2);
 
+/// Compute X^N for N>=0.
+/// 0^0 would return 1.
----------------
kuhar wrote:

ubernit: maybe something more descriptive like:
```suggestion
/// 0^0 is supported and returns 1.
```

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


More information about the llvm-commits mailing list