| ... | ... | @@ -3067,7 +3067,12 @@ fn airSaveErrReturnTraceIndex(self: *Self, inst: Air.Inst.Index) !void { |
| 3067 | 3067 | |
| 3068 | 3068 | fn airWrapOptional(self: *Self, inst: Air.Inst.Index) !void { |
| 3069 | 3069 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 3070 | | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { |
| 3070 | |
| 3071 | if (self.liveness.isUnused(inst)) { |
| 3072 | return self.finishAir(inst, .dead, .{ ty_op.operand, .none, .none }); |
| 3073 | } |
| 3074 | |
| 3075 | const result: MCValue = result: { |
| 3071 | 3076 | const payload_ty = self.air.typeOf(ty_op.operand); |
| 3072 | 3077 | if (!payload_ty.hasRuntimeBits()) { |
| 3073 | 3078 | break :result MCValue{ .immediate = 1 }; |
| ... | ... | @@ -3100,6 +3105,7 @@ fn airWrapOptional(self: *Self, inst: Air.Inst.Index) !void { |
| 3100 | 3105 | |
| 3101 | 3106 | break :result MCValue{ .stack_offset = stack_offset }; |
| 3102 | 3107 | }; |
| 3108 | |
| 3103 | 3109 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); |
| 3104 | 3110 | } |
| 3105 | 3111 | |