| ... | ... | @@ -15621,11 +15621,15 @@ static IrInstruction *ir_analyze_bit_shift(IrAnalyze *ira, IrInstructionBinOp *b |
| 15621 | 15621 | op1->value->type->data.integral.bit_count - 1); |
| 15622 | 15622 | if (bin_op_instruction->op_id == IrBinOpBitShiftLeftLossy && |
| 15623 | 15623 | op2->value->type->id == ZigTypeIdComptimeInt) { |
| 15624 | | if (!bigint_fits_in_bits(&op2->value->data.x_bigint, |
| 15624 | |
| 15625 | ZigValue *op2_val = ir_resolve_const(ira, op2, UndefBad); |
| 15626 | if (op2_val == nullptr) |
| 15627 | return ira->codegen->invalid_instruction; |
| 15628 | if (!bigint_fits_in_bits(&op2_val->data.x_bigint, |
| 15625 | 15629 | shift_amt_type->data.integral.bit_count, |
| 15626 | | op2->value->data.x_bigint.is_negative)) { |
| 15630 | op2_val->data.x_bigint.is_negative)) { |
| 15627 | 15631 | Buf *val_buf = buf_alloc(); |
| 15628 | | bigint_append_buf(val_buf, &op2->value->data.x_bigint, 10); |
| 15632 | bigint_append_buf(val_buf, &op2_val->data.x_bigint, 10); |
| 15629 | 15633 | ErrorMsg* msg = ir_add_error(ira, |
| 15630 | 15634 | &bin_op_instruction->base, |
| 15631 | 15635 | buf_sprintf("RHS of shift is too large for LHS type")); |