Skip to content

Commit

Permalink
Do not ignore safeToRemove instructions with no users
Browse files Browse the repository at this point in the history
  • Loading branch information
zacikpa authored and viktormalik committed Dec 14, 2023
1 parent 395902b commit 650263c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions diffkemp/simpll/DifferentialFunctionComparator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ bool DifferentialFunctionComparator::maySkipInstruction(
return true;
}
if (config.Patterns.GroupVars && Inst->isSafeToRemove()
&& Inst->user_begin() != Inst->user_end()
&& allUsersAreExtraMemInsts(Inst)) {
// If this is a safe instruction (not a store, call, or a terminator),
// it can be ignored if its users are extra memory instructions, i.e.,
Expand Down

0 comments on commit 650263c

Please sign in to comment.