mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-24 02:54:35 +00:00
control_flow_graph: Treat empty conditional branch as noop (#3296)
This commit is contained in:
parent
de11de43f2
commit
7502739425
@ -141,8 +141,10 @@ void CFG::EmitLabels() {
|
||||
} else if (inst.IsConditionalBranch()) {
|
||||
const u32 true_label = inst.BranchTarget(pc);
|
||||
const u32 false_label = pc + inst.length;
|
||||
AddLabel(true_label);
|
||||
AddLabel(false_label);
|
||||
if (true_label != false_label) {
|
||||
AddLabel(true_label);
|
||||
AddLabel(false_label);
|
||||
}
|
||||
} else if (inst.opcode == Opcode::S_ENDPGM) {
|
||||
const u32 next_label = pc + inst.length;
|
||||
AddLabel(next_label);
|
||||
|
Loading…
Reference in New Issue
Block a user