diff options
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp index c804c2a8e..02cef2645 100644 --- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | |||
| @@ -558,7 +558,6 @@ private: | |||
| 558 | const Node label{goto_stmt->label}; | 558 | const Node label{goto_stmt->label}; |
| 559 | const u32 label_id{label->id}; | 559 | const u32 label_id{label->id}; |
| 560 | const Node label_nested_stmt{FindStatementWithLabel(body, goto_stmt)}; | 560 | const Node label_nested_stmt{FindStatementWithLabel(body, goto_stmt)}; |
| 561 | const auto type{label_nested_stmt->type}; | ||
| 562 | 561 | ||
| 563 | Tree loop_body; | 562 | Tree loop_body; |
| 564 | loop_body.splice(loop_body.begin(), body, label_nested_stmt, goto_stmt); | 563 | loop_body.splice(loop_body.begin(), body, label_nested_stmt, goto_stmt); |
| @@ -566,7 +565,7 @@ private: | |||
| 566 | Statement* const variable{pool.Create(Variable{}, label_id)}; | 565 | Statement* const variable{pool.Create(Variable{}, label_id)}; |
| 567 | Statement* const loop_stmt{pool.Create(Loop{}, variable, std::move(loop_body), parent)}; | 566 | Statement* const loop_stmt{pool.Create(Loop{}, variable, std::move(loop_body), parent)}; |
| 568 | UpdateTreeUp(loop_stmt); | 567 | UpdateTreeUp(loop_stmt); |
| 569 | const Node loop_node{body.insert(goto_stmt, *loop_stmt)}; | 568 | body.insert(goto_stmt, *loop_stmt); |
| 570 | 569 | ||
| 571 | Statement* const new_goto{pool.Create(Goto{}, variable, label, loop_stmt)}; | 570 | Statement* const new_goto{pool.Create(Goto{}, variable, label, loop_stmt)}; |
| 572 | loop_stmt->children.push_front(*new_goto); | 571 | loop_stmt->children.push_front(*new_goto); |