| ... | @@ -21213,11 +21213,17 @@ static IrInstruction *ir_analyze_instruction_check_switch_prongs(IrAnalyze *ira, | ... | @@ -21213,11 +21213,17 @@ static IrInstruction *ir_analyze_instruction_check_switch_prongs(IrAnalyze *ira, |
| 21213 | for (size_t range_i = 0; range_i < instruction->range_count; range_i += 1) { | 21213 | for (size_t range_i = 0; range_i < instruction->range_count; range_i += 1) { |
| 21214 | IrInstructionCheckSwitchProngsRange *range = &instruction->ranges[range_i]; | 21214 | IrInstructionCheckSwitchProngsRange *range = &instruction->ranges[range_i]; |
| 21215 | | 21215 | |
| 21216 | IrInstruction *start_value = range->start->child; | 21216 | IrInstruction *start_value_uncasted = range->start->child; |
| | 21217 | if (type_is_invalid(start_value_uncasted->value.type)) |
| | 21218 | return ira->codegen->invalid_instruction; |
| | 21219 | IrInstruction *start_value = ir_implicit_cast(ira, start_value_uncasted, switch_type); |
| 21217 | if (type_is_invalid(start_value->value.type)) | 21220 | if (type_is_invalid(start_value->value.type)) |
| 21218 | return ira->codegen->invalid_instruction; | 21221 | return ira->codegen->invalid_instruction; |
| 21219 | | 21222 | |
| 21220 | IrInstruction *end_value = range->end->child; | 21223 | IrInstruction *end_value_uncasted = range->end->child; |
| | 21224 | if (type_is_invalid(end_value_uncasted->value.type)) |
| | 21225 | return ira->codegen->invalid_instruction; |
| | 21226 | IrInstruction *end_value = ir_implicit_cast(ira, end_value_uncasted, switch_type); |
| 21221 | if (type_is_invalid(end_value->value.type)) | 21227 | if (type_is_invalid(end_value->value.type)) |
| 21222 | return ira->codegen->invalid_instruction; | 21228 | return ira->codegen->invalid_instruction; |
| 21223 | | 21229 | |