| ... | @@ -13480,8 +13480,7 @@ static IrInstruction *ir_analyze_bin_op_cmp(IrAnalyze *ira, IrInstructionBinOp * | ... | @@ -13480,8 +13480,7 @@ static IrInstruction *ir_analyze_bin_op_cmp(IrAnalyze *ira, IrInstructionBinOp * |
| 13480 | } | 13480 | } |
| 13481 | | 13481 | |
| 13482 | if (one_possible_value || (instr_is_comptime(casted_op1) && instr_is_comptime(casted_op2))) { | 13482 | if (one_possible_value || (instr_is_comptime(casted_op1) && instr_is_comptime(casted_op2))) { |
| 13483 | // TODO do we need lazy values on vector comparisons? | 13483 | { |
| 13484 | if (resolved_type->id != ZigTypeIdVector) { | | |
| 13485 | // Before resolving the values, we special case comparisons against zero. These can often be done | 13484 | // Before resolving the values, we special case comparisons against zero. These can often be done |
| 13486 | // without resolving lazy values, preventing potential dependency loops. | 13485 | // without resolving lazy values, preventing potential dependency loops. |
| 13487 | Cmp op1_cmp_zero; | 13486 | Cmp op1_cmp_zero; |
| ... | @@ -13589,11 +13588,12 @@ never_mind_just_calculate_it_normally: | ... | @@ -13589,11 +13588,12 @@ never_mind_just_calculate_it_normally: |
| 13589 | IrInstruction *result = ir_build_bin_op(&ira->new_irb, | 13588 | IrInstruction *result = ir_build_bin_op(&ira->new_irb, |
| 13590 | bin_op_instruction->base.scope, bin_op_instruction->base.source_node, | 13589 | bin_op_instruction->base.scope, bin_op_instruction->base.source_node, |
| 13591 | op_id, casted_op1, casted_op2, bin_op_instruction->safety_check_on); | 13590 | op_id, casted_op1, casted_op2, bin_op_instruction->safety_check_on); |
| 13592 | if (resolved_type->id == ZigTypeIdVector) | 13591 | if (resolved_type->id == ZigTypeIdVector) { |
| 13593 | result->value.type = get_vector_type(ira->codegen, resolved_type->data.vector.len, | 13592 | result->value.type = get_vector_type(ira->codegen, resolved_type->data.vector.len, |
| 13594 | ira->codegen->builtin_types.entry_bool); | 13593 | ira->codegen->builtin_types.entry_bool); |
| 13595 | else | 13594 | } else { |
| 13596 | result->value.type = ira->codegen->builtin_types.entry_bool; | 13595 | result->value.type = ira->codegen->builtin_types.entry_bool; |
| | 13596 | } |
| 13597 | return result; | 13597 | return result; |
| 13598 | } | 13598 | } |
| 13599 | | 13599 | |