diff --git a/kotlin-native/backend.native/tests/build.gradle b/kotlin-native/backend.native/tests/build.gradle index 1655ea9c829..2d903ff71d4 100644 --- a/kotlin-native/backend.native/tests/build.gradle +++ b/kotlin-native/backend.native/tests/build.gradle @@ -6053,13 +6053,24 @@ if (HostManager.@Companion.hostIsMac) { phaseToCheck = "BitcodeOptimization" } - fileCheckTest("filecheck_redundant_safepoints_removal") { + fileCheckTest("filecheck_redundant_safepoints_removal_arm") { enabled = isExperimentalMM && project.globalTestArgs.contains("-opt") annotatedSource = project.file('filecheck/redundant_safepoints.kt') targetName = "watchos_arm32" + checkPrefix = "CHECK-ARM" extraOpts = ["-Xbinary=memoryModel=experimental", "-opt"] phaseToCheck = "RemoveRedundantSafepoints" } + +} + +fileCheckTest("filecheck_redundant_safepoints_removal") { + enabled = isExperimentalMM && + project.globalTestArgs.contains("-opt") && + project.testTarget != "watchos_arm32" && + project.testTarget != "ios_arm32" + annotatedSource = project.file('filecheck/redundant_safepoints.kt') + phaseToCheck = "RemoveRedundantSafepoints" } fileCheckTest("filecheck_replace_invoke_with_call") { diff --git a/kotlin-native/backend.native/tests/filecheck/redundant_safepoints.kt b/kotlin-native/backend.native/tests/filecheck/redundant_safepoints.kt index 9445c8b0cc6..427be5aaa77 100644 --- a/kotlin-native/backend.native/tests/filecheck/redundant_safepoints.kt +++ b/kotlin-native/backend.native/tests/filecheck/redundant_safepoints.kt @@ -15,17 +15,21 @@ fun g() = f() // CHECK-LABEL: define %struct.ObjHeader* @"kfun:#h(kotlin.Boolean){}kotlin.Any" @Retain fun h(cond: Boolean): Any { - // CHECK: Kotlin_mm_safePointFunctionPrologue - // CHECK-NOT: Kotlin_mm_safePointFunctionPrologue + // CHECK: _ZN6kotlin2mm8internal20gSuspensionRequestedE + // CHECK-ARM: {{call .*Kotlin_mm_safePointFunctionPrologue}} + // CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE + // CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}} // CHECK: br + // CHECK-ARM: br if (cond) { - // CHECK: Kotlin_mm_safePointFunctionPrologue - // CHECK-NOT: Kotlin_mm_safePointFunctionPrologue + // CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE + // CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}} // CHECK: br + // CHECK-ARM: br return listOf(C(), C()) } else { - // CHECK: Kotlin_mm_safePointFunctionPrologue - // CHECK-NOT: Kotlin_mm_safePointFunctionPrologue + // CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE + // CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}} return listOf(C(), C(), C()) } // CHECK: } @@ -34,8 +38,10 @@ fun h(cond: Boolean): Any { // CHECK-LABEL: define void @"kfun:#main(){}"() @Retain fun main() { - // CHECK: Kotlin_mm_safePointFunctionPrologue - // CHECK-NOT: Kotlin_mm_safePointFunctionPrologue + // CHECK: _ZN6kotlin2mm8internal20gSuspensionRequestedE + // CHECK-ARM: {{call .*Kotlin_mm_safePointFunctionPrologue}} + // CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE + // CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}} println(g()) println(h(true)) // CHECK: }