aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-12-02 19:56:43 +0200
committerVeikka Tuominen <git@vexu.eu>2022-12-03 00:09:23 +0200
commit0e38cc16d51178525e89774ce9151651b6a0e99a (patch)
tree41e3768824dc156b70fccf506362f4fa7277e3ae /src/codegen/llvm.zig
parent7f9e841f746bb3eaf6ac205092a30bc7ed12a068 (diff)
downloadzig-0e38cc16d51178525e89774ce9151651b6a0e99a.tar.gz
zig-0e38cc16d51178525e89774ce9151651b6a0e99a.zip
Sema: fix comparisons between lazy and runtime values
Closes #12498
Diffstat (limited to 'src/codegen/llvm.zig')
-rw-r--r--src/codegen/llvm.zig2
1 files changed, 1 insertions, 1 deletions
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);
}