From 0e38cc16d51178525e89774ce9151651b6a0e99a Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Fri, 2 Dec 2022 19:56:43 +0200 Subject: Sema: fix comparisons between lazy and runtime values Closes #12498 --- src/codegen/llvm.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen/llvm.zig') diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 6215a11e6f..3fd1effc21 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -8932,7 +8932,7 @@ pub const FuncGen = struct { if (elem.isUndef()) { val.* = llvm_i32.getUndef(); } else { - const int = elem.toSignedInt(); + const int = elem.toSignedInt(self.dg.module.getTarget()); const unsigned = if (int >= 0) @intCast(u32, int) else @intCast(u32, ~int + a_len); val.* = llvm_i32.constInt(unsigned, .False); } -- cgit v1.2.3