Skip to content

Commit dae102c

Browse files
committed
remove redundant test cases
1 parent 2869e7b commit dae102c

File tree

3 files changed

+7244
-7250
lines changed

3 files changed

+7244
-7250
lines changed

src/Sema.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14860,7 +14860,7 @@ fn zirDiv(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Ins
1486014860
try sema.addDivByZeroSafety(block, src, resolved_type, maybe_rhs_val, casted_rhs, is_int);
1486114861
}
1486214862

14863-
const air_tag = if (is_int) blk: {
14863+
const air_tag: Air.Inst.Tag = if (is_int) blk: {
1486414864
if (lhs_ty.isSignedInt(zcu) or rhs_ty.isSignedInt(zcu)) {
1486514865
return sema.fail(
1486614866
block,
@@ -14869,10 +14869,10 @@ fn zirDiv(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Ins
1486914869
.{ lhs_ty.fmt(pt), rhs_ty.fmt(pt) },
1487014870
);
1487114871
}
14872-
break :blk Air.Inst.Tag.div_trunc;
14872+
break :blk .div_trunc;
1487314873
} else switch (block.float_mode) {
14874-
.optimized => Air.Inst.Tag.div_float_optimized,
14875-
.strict => Air.Inst.Tag.div_float,
14874+
.optimized => .div_float_optimized,
14875+
.strict => .div_float,
1487614876
};
1487714877
return block.addBinOp(air_tag, casted_lhs, casted_rhs);
1487814878
}

src/Zcu/PerThread.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3668,8 +3668,8 @@ pub fn unionValue(pt: Zcu.PerThread, union_ty: Type, tag: Value, val: Value) All
36683668
pub fn aggregateValue(pt: Zcu.PerThread, ty: Type, elems: []const InternPool.Index) Allocator.Error!Value {
36693669
for (elems) |elem| {
36703670
if (!Value.fromInterned(elem).isUndef(pt.zcu)) break;
3671-
} else if (elems.len > 0) { // all-undef
3672-
return pt.undefValue(ty);
3671+
} else if (elems.len > 0) {
3672+
return pt.undefValue(ty); // all-undef
36733673
}
36743674
return .fromInterned(try pt.intern(.{ .aggregate = .{
36753675
.ty = ty.toIntern(),

0 commit comments

Comments
 (0)