mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-31 20:21:06 +00:00
Fixing missing early exit from break identification
This commit is contained in:
parent
80b743a570
commit
5e70d20d80
@ -241,6 +241,7 @@ void AggressiveDCEPass::AddBreaksAndContinuesToWorklist(
|
|||||||
mergeId, [&loopMerge, this](ir::Instruction* user) {
|
mergeId, [&loopMerge, this](ir::Instruction* user) {
|
||||||
// A branch to the merge block can only be a break if it is nested in
|
// A branch to the merge block can only be a break if it is nested in
|
||||||
// the current loop
|
// the current loop
|
||||||
|
if (!user->IsBranch()) return;
|
||||||
ir::Instruction* branchInst = user;
|
ir::Instruction* branchInst = user;
|
||||||
while (true) {
|
while (true) {
|
||||||
ir::BasicBlock* blk = context()->get_instr_block(branchInst);
|
ir::BasicBlock* blk = context()->get_instr_block(branchInst);
|
||||||
|
Loading…
Reference in New Issue
Block a user