| ... | ... | @@ -12993,8 +12993,12 @@ fn zirShl( |
| 12993 | 12993 | const scalar_rhs_ty = rhs_ty.scalarType(zcu); |
| 12994 | 12994 | |
| 12995 | 12995 | // AstGen currently forces the rhs of `<<` to coerce to the correct type before the `.shl` instruction, so |
| 12996 | | // we already know `scalar_rhs_ty` is valid for `.shl` -- we only need to validate for `.shl_sat`. |
| 12997 | | if (air_tag == .shl_sat) _ = try sema.checkIntType(block, rhs_src, scalar_rhs_ty); |
| 12996 | // we already know `scalar_rhs_ty` is valid for `.shl`; likewise the lhs is validated when its |
| 12997 | // `typeof_log2_int_type` is evaluated. `.shl_sat` gets neither coercion, so validate both operands here. |
| 12998 | if (air_tag == .shl_sat) { |
| 12999 | _ = try sema.log2IntType(block, lhs_ty, lhs_src); |
| 13000 | _ = try sema.checkIntType(block, rhs_src, scalar_rhs_ty); |
| 13001 | } |
| 12998 | 13002 | |
| 12999 | 13003 | const maybe_lhs_val = sema.resolveValue(lhs); |
| 13000 | 13004 | const maybe_rhs_val = sema.resolveValue(rhs); |