summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/passes/SimplifyLocals.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/passes/SimplifyLocals.cpp b/src/passes/SimplifyLocals.cpp
index 27d868da1..d941ce0d4 100644
--- a/src/passes/SimplifyLocals.cpp
+++ b/src/passes/SimplifyLocals.cpp
@@ -685,11 +685,9 @@ struct SimplifyLocals : public WalkerPass<LinearExecutionWalker<SimplifyLocals<a
// This is an unnecessary copy!
if (removeEquivalentSets) {
if (curr->isTee()) {
- this->replaceCurrent(value);
- } else if (curr->value->is<GetLocal>()) {
- ExpressionManipulator::nop(curr);
+ this->replaceCurrent(curr->value);
} else {
- this->replaceCurrent(Builder(*module).makeDrop(value));
+ this->replaceCurrent(Builder(*module).makeDrop(curr->value));
}
anotherCycle = true;
}