summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/ir_opt
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/ir_opt')
-rw-r--r--src/shader_recompiler/ir_opt/constant_propagation_pass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
index 052f1609b..7da4d50ef 100644
--- a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
+++ b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
@@ -5,6 +5,7 @@
#include <algorithm>
#include <tuple>
#include <type_traits>
+#include <ranges>
#include "common/bit_cast.h"
#include "common/bit_util.h"
@@ -424,7 +425,7 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) {
} // Anonymous namespace
void ConstantPropagationPass(IR::Program& program) {
- for (IR::Block* const block : program.post_order_blocks) {
+ for (IR::Block* const block : program.post_order_blocks | std::views::reverse) {
for (IR::Inst& inst : block->Instructions()) {
ConstantPropagation(*block, inst);
}