Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions source/opt/merge_return_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,10 +828,12 @@ BasicBlock* MergeReturnPass::CreateContinueTarget(uint32_t header_label_id) {

bool MergeReturnPass::CreateSingleCaseSwitch(BasicBlock* merge_target) {
// Insert the switch before any code is run. We have to split the entry
// block to make sure the OpVariable instructions remain in the entry block.
// block to make sure the OpVariable instructions and DebugFunctionDefinition
// instructions remain in the entry block.
BasicBlock* start_block = &*function_->begin();
auto split_pos = start_block->begin();
while (split_pos->opcode() == spv::Op::OpVariable) {
while ((split_pos->opcode() == spv::Op::OpVariable) ||
(split_pos->GetShader100DebugOpcode() == NonSemanticShaderDebugInfo100DebugFunctionDefinition)) {
Comment thread
s-perron marked this conversation as resolved.
Outdated
++split_pos;
}

Expand Down