diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt index a9110a5d654..98d619f270d 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt @@ -309,6 +309,15 @@ internal class ModuleDFGBuilder(val context: Context, val irModule: IrModuleFrag expressions += expression to currentLoop } + if (expression is IrCall && expression.symbol == initInstanceSymbol) { + // Skip the constructor call as initInstance is handled specially later. + val thiz = expression.getValueArgument(0)!! + val constructorCall = expression.getValueArgument(1)!! + thiz.acceptVoid(this) + constructorCall.acceptChildrenVoid(this) + return + } + if (expression is IrCall && expression.symbol == executeImplSymbol) { // Producer and job of executeImpl are called externally, we need to reflect this somehow. val producerInvocation = IrCallImpl.fromSymbolDescriptor(expression.startOffset, expression.endOffset,