Fixing missing early exit from break identification

This commit is contained in:
Alan Baker 2018-01-17 14:09:24 -05:00
parent 80b743a570
commit 5e70d20d80

View File

@ -241,6 +241,7 @@ void AggressiveDCEPass::AddBreaksAndContinuesToWorklist(
mergeId, [&loopMerge, this](ir::Instruction* user) {
// A branch to the merge block can only be a break if it is nested in
// the current loop
if (!user->IsBranch()) return;
ir::Instruction* branchInst = user;
while (true) {
ir::BasicBlock* blk = context()->get_instr_block(branchInst);