| ... | ... | @@ -7635,7 +7635,7 @@ static TypeTableEntry *ir_analyze_instruction_switch_br(IrAnalyze *ira, |
| 7635 | 7635 | size_t case_count = switch_br_instruction->case_count; |
| 7636 | 7636 | bool is_inline = ir_should_inline(&ira->new_irb) || switch_br_instruction->is_inline; |
| 7637 | 7637 | |
| 7638 | | if (is_inline || target_value->static_value.special != ConstValSpecialRuntime) { |
| 7638 | if (is_inline || instr_is_comptime(target_value)) { |
| 7639 | 7639 | ConstExprValue *target_val = ir_resolve_const(ira, target_value); |
| 7640 | 7640 | if (!target_val) |
| 7641 | 7641 | return ir_unreach_error(ira); |
| ... | ... | @@ -7646,6 +7646,12 @@ static TypeTableEntry *ir_analyze_instruction_switch_br(IrAnalyze *ira, |
| 7646 | 7646 | if (case_value->type_entry->id == TypeTableEntryIdInvalid) |
| 7647 | 7647 | return ir_unreach_error(ira); |
| 7648 | 7648 | |
| 7649 | if (case_value->type_entry->id == TypeTableEntryIdEnum) { |
| 7650 | case_value = ir_analyze_enum_tag(ira, &switch_br_instruction->base, case_value); |
| 7651 | if (case_value->type_entry->id == TypeTableEntryIdInvalid) |
| 7652 | return ir_unreach_error(ira); |
| 7653 | } |
| 7654 | |
| 7649 | 7655 | IrInstruction *casted_case_value = ir_implicit_cast(ira, case_value, target_value->type_entry); |
| 7650 | 7656 | if (casted_case_value->type_entry->id == TypeTableEntryIdInvalid) |
| 7651 | 7657 | return ir_unreach_error(ira); |