| ... | @@ -15620,7 +15620,6 @@ fn zirOverflowArithmetic( | ... | @@ -15620,7 +15620,6 @@ fn zirOverflowArithmetic( |
| 15620 | // If either of the arguments is undefined, IB is possible and we return an error. | 15620 | // If either of the arguments is undefined, IB is possible and we return an error. |
| 15621 | // If lhs is zero, the result is zero and no overflow occurred. | 15621 | // If lhs is zero, the result is zero and no overflow occurred. |
| 15622 | // If rhs is zero, the result is lhs and no overflow occurred. | 15622 | // If rhs is zero, the result is lhs and no overflow occurred. |
| 15623 | // Oterhwise if either of the arguments is undefined, both results are undefined. | | |
| 15624 | const scalar_ty = lhs_ty.scalarType(zcu); | 15623 | const scalar_ty = lhs_ty.scalarType(zcu); |
| 15625 | if (maybe_rhs_val) |rhs_val| { | 15624 | if (maybe_rhs_val) |rhs_val| { |
| 15626 | if (maybe_lhs_val) |lhs_val| { | 15625 | if (maybe_lhs_val) |lhs_val| { |
| ... | @@ -15661,7 +15660,7 @@ fn zirOverflowArithmetic( | ... | @@ -15661,7 +15660,7 @@ fn zirOverflowArithmetic( |
| 15661 | .lt => return sema.failWithNegativeShiftAmount(block, rhs_src, rhs_elem, elem_idx), | 15660 | .lt => return sema.failWithNegativeShiftAmount(block, rhs_src, rhs_elem, elem_idx), |
| 15662 | } | 15661 | } |
| 15663 | } | 15662 | } |
| 15664 | if (!any_positive) break :result .{ .overflow_bit = .zero_u1, .inst = lhs }; | 15663 | if (!any_positive) break :result .{ .overflow_bit = try pt.aggregateSplatValue(overflow_ty, .zero_u1), .inst = lhs }; |
| 15665 | }, | 15664 | }, |
| 15666 | else => unreachable, | 15665 | else => unreachable, |
| 15667 | } | 15666 | } |