diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-10-31 17:46:46 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-10-31 19:34:15 +0100 |
commit | c50ad56bf59169bd0fc808ebecfb4a69376f10df (patch) | |
tree | 56b4c044f6116a092370438c89b96e1400ad363a /src/shader_recompiler/ir_opt | |
parent | Merge pull request #6702 from lat9nq/disable-screensaver (diff) | |
download | yuzu-c50ad56bf59169bd0fc808ebecfb4a69376f10df.tar yuzu-c50ad56bf59169bd0fc808ebecfb4a69376f10df.tar.gz yuzu-c50ad56bf59169bd0fc808ebecfb4a69376f10df.tar.bz2 yuzu-c50ad56bf59169bd0fc808ebecfb4a69376f10df.tar.lz yuzu-c50ad56bf59169bd0fc808ebecfb4a69376f10df.tar.xz yuzu-c50ad56bf59169bd0fc808ebecfb4a69376f10df.tar.zst yuzu-c50ad56bf59169bd0fc808ebecfb4a69376f10df.zip |
Diffstat (limited to 'src/shader_recompiler/ir_opt')
-rw-r--r-- | src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp b/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp index 53145fb5e..5545f8197 100644 --- a/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp +++ b/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp @@ -378,6 +378,13 @@ void SsaRewritePass(IR::Program& program) { for (auto block = program.post_order_blocks.rbegin(); block != end; ++block) { VisitBlock(pass, *block); } + for (auto block = program.post_order_blocks.rbegin(); block != end; ++block) { + for (IR::Inst& inst : (*block)->Instructions()) { + if (inst.GetOpcode() == IR::Opcode::Phi) { + inst.OrderPhiArgs(); + } + } + } } } // namespace Shader::Optimization |