[PR #1785] [MERGED] recompiler: emit a label right after s_branch #2303

Closed
opened 2026-02-27 21:15:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1785
Author: @roamic
Created: 12/14/2024
Status: Merged
Merged: 12/14/2024
Merged by: @raphaelthegreat

Base: mainHead: fix-s-branch


📝 Commits (1)

  • f856373 recompiler: emit a label right after s_branch to prevent dead code interferrence

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 src/shader_recompiler/frontend/control_flow_graph.cpp (+2 -0)

📄 Description

The block generation code creates blocks from label to label and without this s_branch instruction is ignored if the following instruction is not referenced by another label. We now insert a fake label for all code that follows this instruction so that the block ends correctly.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/1785 **Author:** [@roamic](https://github.com/roamic) **Created:** 12/14/2024 **Status:** ✅ Merged **Merged:** 12/14/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `fix-s-branch` --- ### 📝 Commits (1) - [`f856373`](https://github.com/shadps4-emu/shadPS4/commit/f8563731ea107097e291ab299674552085833ea2) recompiler: emit a label right after s_branch to prevent dead code interferrence ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/frontend/control_flow_graph.cpp` (+2 -0) </details> ### 📄 Description The block generation code creates blocks from label to label and without this `s_branch` instruction is ignored if the following instruction is not referenced by another label. We now insert a fake label for all code that follows this instruction so that the block ends correctly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:15:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#2303
No description provided.