diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-10-28 17:41:45 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-10-28 17:41:45 -0700 |
| commit | 98009a2f66de32d1ea4df41cc03d5ad3d723b3ed (patch) | |
| tree | 6835afcef70cffd09159cd890b5ab1fc4104f139 /src/codegen/llvm.zig | |
| parent | 5479c0f9ac7f7ed4808141ce518d3553240fd01b (diff) | |
| download | zig-98009a2f66de32d1ea4df41cc03d5ad3d723b3ed.tar.gz zig-98009a2f66de32d1ea4df41cc03d5ad3d723b3ed.zip | |
C backend: implement trunc instruction
Note that there is not any test coverage yet for integer
truncation involving non-power-of-two integers.
Diffstat (limited to 'src/codegen/llvm.zig')
| -rw-r--r-- | src/codegen/llvm.zig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 9c2fd22df0..572e23ff28 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -3153,8 +3153,7 @@ pub const FuncGen = struct { } fn airTrunc(self: *FuncGen, inst: Air.Inst.Index) !?*const llvm.Value { - if (self.liveness.isUnused(inst)) - return null; + if (self.liveness.isUnused(inst)) return null; const ty_op = self.air.instructions.items(.data)[inst].ty_op; const operand = try self.resolveInst(ty_op.operand); |
