control_flow: Don't emit discard for null exports
This commit is contained in:
parent
6428b04f06
commit
12f1743d5f
|
@ -149,7 +149,8 @@ void CFG::LinkBlocks() {
|
||||||
block.end_class = EndClass::Branch;
|
block.end_class = EndClass::Branch;
|
||||||
} else if (end_inst.opcode == Opcode::S_ENDPGM) {
|
} else if (end_inst.opcode == Opcode::S_ENDPGM) {
|
||||||
const auto& prev_inst = inst_list[block.end_index - 1];
|
const auto& prev_inst = inst_list[block.end_index - 1];
|
||||||
if (prev_inst.opcode == Opcode::EXP && prev_inst.control.exp.en == 0) {
|
if (prev_inst.opcode == Opcode::EXP && prev_inst.control.exp.en == 0 &&
|
||||||
|
prev_inst.control.exp.target != 9) {
|
||||||
block.end_class = EndClass::Kill;
|
block.end_class = EndClass::Kill;
|
||||||
} else {
|
} else {
|
||||||
block.end_class = EndClass::Exit;
|
block.end_class = EndClass::Exit;
|
||||||
|
|
Loading…
Reference in New Issue