diff --git a/stage0/sema.c b/stage0/sema.c index a0fa20b9e1..a0c4d78326 100644 --- a/stage0/sema.c +++ b/stage0/sema.c @@ -1326,8 +1326,10 @@ static AirInstRef zirCmpEq( TypeIndex result_ty = (lhs_ty == IP_INDEX_COMPTIME_INT_TYPE) ? rhs_ty : lhs_ty; if (result_ty != IP_INDEX_COMPTIME_INT_TYPE) { - lhs = semaCoerce(sema, block, result_ty, lhs); - rhs = semaCoerce(sema, block, result_ty, rhs); + // Coerce for IP side effects (creates typed int entries); + // comparison uses captured lhs_lo/rhs_lo values. + (void)semaCoerce(sema, block, result_ty, lhs); + (void)semaCoerce(sema, block, result_ty, rhs); } bool eq = (lhs_lo == rhs_lo && lhs_hi == rhs_hi); return AIR_REF_FROM_IP((eq == (air_tag == AIR_INST_CMP_EQ))