projects
/
platform
/
upstream
/
SPIRV-Tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80b743a
)
Fixing missing early exit from break identification
author
Alan Baker
<alanbaker@google.com>
Wed, 17 Jan 2018 19:09:24 +0000
(14:09 -0500)
committer
Alan Baker
<alanbaker@google.com>
Wed, 17 Jan 2018 19:09:24 +0000
(14:09 -0500)
source/opt/aggressive_dead_code_elim_pass.cpp
patch
|
blob
|
history
diff --git
a/source/opt/aggressive_dead_code_elim_pass.cpp
b/source/opt/aggressive_dead_code_elim_pass.cpp
index 511a12f87905f0c29840e4844c2f7f8bdfd53e53..2e79fe65c02abc694a7f646ccd585500790c9750 100644
(file)
--- a/
source/opt/aggressive_dead_code_elim_pass.cpp
+++ b/
source/opt/aggressive_dead_code_elim_pass.cpp
@@
-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);