diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-12-02 19:56:43 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-12-03 00:09:23 +0200 |
| commit | 0e38cc16d51178525e89774ce9151651b6a0e99a (patch) | |
| tree | 41e3768824dc156b70fccf506362f4fa7277e3ae /src/codegen/llvm.zig | |
| parent | 7f9e841f746bb3eaf6ac205092a30bc7ed12a068 (diff) | |
| download | zig-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.zig | 2 |
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); } |
