From d5dd96d6266f5a9cd4e89681f5e990b1854eb403 Mon Sep 17 00:00:00 2001 From: Nukem Date: Sat, 18 Jun 2016 16:34:46 -0400 Subject: [PATCH] Invalid iterator in control_flow_simplification_pass --- .../gpu/spirv/passes/control_flow_simplification_pass.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/gpu/spirv/passes/control_flow_simplification_pass.cc b/src/xenia/gpu/spirv/passes/control_flow_simplification_pass.cc index 7b01aa5aa..d32997d47 100644 --- a/src/xenia/gpu/spirv/passes/control_flow_simplification_pass.cc +++ b/src/xenia/gpu/spirv/passes/control_flow_simplification_pass.cc @@ -20,7 +20,7 @@ bool ControlFlowSimplificationPass::Run(spv::Module* module) { // Walk through the blocks in the function and merge any blocks which are // unconditionally dominated. for (auto it = function->getBlocks().end() - 1; - it != function->getBlocks().begin() - 1;) { + it != function->getBlocks().begin();) { auto block = *it; if (!block->isUnreachable() && block->getPredecessors().size() == 1) { auto prev_block = block->getPredecessors()[0]; @@ -45,4 +45,4 @@ bool ControlFlowSimplificationPass::Run(spv::Module* module) { } // namespace spirv } // namespace gpu -} // namespace xe \ No newline at end of file +} // namespace xe