From 98009a2f66de32d1ea4df41cc03d5ad3d723b3ed Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 28 Oct 2021 17:41:45 -0700 Subject: C backend: implement trunc instruction Note that there is not any test coverage yet for integer truncation involving non-power-of-two integers. --- src/codegen/llvm.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/codegen/llvm.zig') 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); -- cgit v1.2.3