diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/param-utils.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/passes/param-utils.cpp b/src/passes/param-utils.cpp index 3b0721173..e94ea95b1 100644 --- a/src/passes/param-utils.cpp +++ b/src/passes/param-utils.cpp @@ -79,11 +79,8 @@ bool removeParameter(const std::vector<Function*>& funcs, bool hasUnremovable = EffectAnalyzer(runner->options, *module, operands[index]) .hasUnremovableSideEffects(); - bool wouldChangeType = - call->type == Type::unreachable && !call->isReturn && - std::any_of(operands.begin(), operands.end(), [](Expression* operand) { - return operand->type == Type::unreachable; - }); + bool wouldChangeType = call->type == Type::unreachable && !call->isReturn && + operands[index]->type == Type::unreachable; return hasUnremovable || wouldChangeType; }; bool callParamsAreValid = |