diff --git a/diffkemp/simpll/DifferentialFunctionComparator.cpp b/diffkemp/simpll/DifferentialFunctionComparator.cpp index a8bad23b8..9e567ba81 100644 --- a/diffkemp/simpll/DifferentialFunctionComparator.cpp +++ b/diffkemp/simpll/DifferentialFunctionComparator.cpp @@ -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.,