summaryrefslogtreecommitdiff
path: root/src/passes/StackIR.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/StackIR.cpp')
-rw-r--r--src/passes/StackIR.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/passes/StackIR.cpp b/src/passes/StackIR.cpp
index 438ed8b55..bc91d0703 100644
--- a/src/passes/StackIR.cpp
+++ b/src/passes/StackIR.cpp
@@ -194,7 +194,11 @@ private:
// This is something we should handle, look into it.
if (inst->type.isConcrete()) {
bool optimized = false;
- if (auto* get = inst->origin->dynCast<LocalGet>()) {
+ // Do not optimize multivalue locals, since those will be better
+ // optimized when they are visited in the binary writer and this
+ // optimization would intefere with that one.
+ if (auto* get = inst->origin->dynCast<LocalGet>();
+ get && inst->type.isSingle()) {
// This is a potential optimization opportunity! See if we
// can reach the set.
if (values.size() > 0) {