aboutsummaryrefslogtreecommitdiff
path: root/src/value.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.zig')
-rw-r--r--src/value.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/value.zig b/src/value.zig
index 89ba1fba67..62a83c7901 100644
--- a/src/value.zig
+++ b/src/value.zig
@@ -1216,10 +1216,10 @@ pub const Value = struct {
return bigint.clz(ty.intInfo(mod).bits);
}
- pub fn ctz(val: Value, _: Type, mod: *Module) u64 {
+ pub fn ctz(val: Value, ty: Type, mod: *Module) u64 {
var bigint_buf: BigIntSpace = undefined;
const bigint = val.toBigInt(&bigint_buf, mod);
- return bigint.ctz();
+ return bigint.ctz(ty.intInfo(mod).bits);
}
pub fn popCount(val: Value, ty: Type, mod: *Module) u64 {