summaryrefslogtreecommitdiff
path: root/src/passes/FuncCastEmulation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/FuncCastEmulation.cpp')
-rw-r--r--src/passes/FuncCastEmulation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/passes/FuncCastEmulation.cpp b/src/passes/FuncCastEmulation.cpp
index 59a2588da..013e9403e 100644
--- a/src/passes/FuncCastEmulation.cpp
+++ b/src/passes/FuncCastEmulation.cpp
@@ -142,9 +142,10 @@ struct ParallelFuncCastEmulation : public WalkerPass<PostWalker<ParallelFuncCast
curr->operands.push_back(LiteralUtils::makeZero(i64, *getModule()));
}
// Set the new types
+ curr->fullType = ABIType;
auto oldType = curr->type;
curr->type = i64;
- curr->fullType = ABIType;
+ curr->finalize(); // may be unreachable
// Fix up return value
replaceCurrent(fromABI(curr, oldType, getModule()));
}