summaryrefslogtreecommitdiff
path: root/src/passes/SimplifyLocals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/SimplifyLocals.cpp')
-rw-r--r--src/passes/SimplifyLocals.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/passes/SimplifyLocals.cpp b/src/passes/SimplifyLocals.cpp
index eca503ad4..cf0b74950 100644
--- a/src/passes/SimplifyLocals.cpp
+++ b/src/passes/SimplifyLocals.cpp
@@ -1088,15 +1088,15 @@ struct SimplifyLocals
}
auto bestType = func->getLocalType(best);
- auto indexType = func->getLocalType(index);
- if (!Type::isSubType(indexType, bestType)) {
+ auto addressType = func->getLocalType(index);
+ if (!Type::isSubType(addressType, bestType)) {
// This is less refined than the current best; ignore.
continue;
}
// This is better if it has a more refined type, or if it has more
// uses.
- if (indexType != bestType ||
+ if (addressType != bestType ||
getNumGetsIgnoringCurr(index) > getNumGetsIgnoringCurr(best)) {
best = index;
}