| ... | ... | @@ -621,11 +621,18 @@ pub fn categorizeOperand( |
| 621 | 621 | if (inst_data.operand == operand_ref and operandDies(l, body[0], 0)) |
| 622 | 622 | return .tomb; |
| 623 | 623 | |
| 624 | | if (cond_extra.data.then_body_len != 1 or cond_extra.data.else_body_len != 1) |
| 624 | if (cond_extra.data.then_body_len > 2 or cond_extra.data.else_body_len > 2) |
| 625 | return .complex; |
| 626 | |
| 627 | const then_body = air.extra[cond_extra.end..][0..cond_extra.data.then_body_len]; |
| 628 | const else_body = air.extra[cond_extra.end + cond_extra.data.then_body_len ..][0 .. cond_extra.data.then_body_len + cond_extra.data.else_body_len]; |
| 629 | if (then_body.len > 1 and air_tags[then_body[1]] != .unreach) |
| 630 | return .complex; |
| 631 | if (else_body.len > 1 and air_tags[else_body[1]] != .unreach) |
| 625 | 632 | return .complex; |
| 626 | 633 | |
| 627 | 634 | var operand_live: bool = true; |
| 628 | | for (air.extra[cond_extra.end..][0..2]) |cond_inst| { |
| 635 | for (&[_]u32{ then_body[0], else_body[0] }) |cond_inst| { |
| 629 | 636 | if (l.categorizeOperand(air, cond_inst, operand, ip) == .tomb) |
| 630 | 637 | operand_live = false; |
| 631 | 638 | |