| ... | ... | @@ -3095,7 +3095,8 @@ fn airPopcount(self: *Self, inst: Air.Inst.Index) !void { |
| 3095 | 3095 | }; |
| 3096 | 3096 | defer if (mat_src_lock) |lock| self.register_manager.unlockReg(lock); |
| 3097 | 3097 | |
| 3098 | | const dst_mcv: MCValue = if (self.reuseOperand(inst, ty_op.operand, 0, src_mcv)) |
| 3098 | const dst_mcv: MCValue = |
| 3099 | if (src_mcv.isRegister() and self.reuseOperand(inst, ty_op.operand, 0, src_mcv)) |
| 3099 | 3100 | src_mcv |
| 3100 | 3101 | else |
| 3101 | 3102 | .{ .register = try self.register_manager.allocReg(inst, gp) }; |
| ... | ... | @@ -5478,6 +5479,9 @@ fn airCmp(self: *Self, inst: Air.Inst.Index, op: math.CompareOperator) !void { |
| 5478 | 5479 | } |
| 5479 | 5480 | |
| 5480 | 5481 | const ty = self.air.typeOf(bin_op.lhs); |
| 5482 | const abi_size = ty.abiSize(self.target.*); |
| 5483 | if (abi_size > 8) return self.fail("TODO implement cmp for large values", .{}); |
| 5484 | |
| 5481 | 5485 | const signedness: std.builtin.Signedness = blk: { |
| 5482 | 5486 | // For non-int types, we treat the values as unsigned |
| 5483 | 5487 | if (ty.zigTypeTag() != .Int) break :blk .unsigned; |