diff options
Diffstat (limited to 'src/passes/OptimizeInstructions.cpp')
-rw-r--r-- | src/passes/OptimizeInstructions.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/OptimizeInstructions.cpp b/src/passes/OptimizeInstructions.cpp index cf5ad982e..d28bf21a5 100644 --- a/src/passes/OptimizeInstructions.cpp +++ b/src/passes/OptimizeInstructions.cpp @@ -228,6 +228,9 @@ static Index getMaxBits(Expression* curr) { case WrapInt64: return std::min(Index(32), getMaxBits(unary->value)); default: {} } + } else if (auto* set = curr->dynCast<SetLocal>()) { + // a tee passes through the value + return getMaxBits(set->value); } switch (curr->type) { case i32: return 32; |