remove redundant test cases

This commit is contained in:
Justus Klausecker 2025-08-08 15:16:34 +02:00
parent 76d2782149
commit 79756e681d
3 changed files with 7244 additions and 7250 deletions

View File

@ -14859,7 +14859,7 @@ fn zirDiv(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Ins
try sema.addDivByZeroSafety(block, src, resolved_type, maybe_rhs_val, casted_rhs, is_int);
}
const air_tag = if (is_int) blk: {
const air_tag: Air.Inst.Tag = if (is_int) blk: {
if (lhs_ty.isSignedInt(zcu) or rhs_ty.isSignedInt(zcu)) {
return sema.fail(
block,
@ -14868,10 +14868,10 @@ fn zirDiv(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Ins
.{ lhs_ty.fmt(pt), rhs_ty.fmt(pt) },
);
}
break :blk Air.Inst.Tag.div_trunc;
break :blk .div_trunc;
} else switch (block.float_mode) {
.optimized => Air.Inst.Tag.div_float_optimized,
.strict => Air.Inst.Tag.div_float,
.optimized => .div_float_optimized,
.strict => .div_float,
};
return block.addBinOp(air_tag, casted_lhs, casted_rhs);
}

View File

@ -3668,8 +3668,8 @@ pub fn unionValue(pt: Zcu.PerThread, union_ty: Type, tag: Value, val: Value) All
pub fn aggregateValue(pt: Zcu.PerThread, ty: Type, elems: []const InternPool.Index) Allocator.Error!Value {
for (elems) |elem| {
if (!Value.fromInterned(elem).isUndef(pt.zcu)) break;
} else if (elems.len > 0) { // all-undef
return pt.undefValue(ty);
} else if (elems.len > 0) {
return pt.undefValue(ty); // all-undef
}
return .fromInterned(try pt.intern(.{ .aggregate = .{
.ty = ty.toIntern(),

File diff suppressed because it is too large Load Diff