[K/N] Fix filecheck test for redundant safepoints removal
This commit is contained in:
@@ -6053,13 +6053,24 @@ if (HostManager.@Companion.hostIsMac) {
|
|||||||
phaseToCheck = "BitcodeOptimization"
|
phaseToCheck = "BitcodeOptimization"
|
||||||
}
|
}
|
||||||
|
|
||||||
fileCheckTest("filecheck_redundant_safepoints_removal") {
|
fileCheckTest("filecheck_redundant_safepoints_removal_arm") {
|
||||||
enabled = isExperimentalMM && project.globalTestArgs.contains("-opt")
|
enabled = isExperimentalMM && project.globalTestArgs.contains("-opt")
|
||||||
annotatedSource = project.file('filecheck/redundant_safepoints.kt')
|
annotatedSource = project.file('filecheck/redundant_safepoints.kt')
|
||||||
targetName = "watchos_arm32"
|
targetName = "watchos_arm32"
|
||||||
|
checkPrefix = "CHECK-ARM"
|
||||||
extraOpts = ["-Xbinary=memoryModel=experimental", "-opt"]
|
extraOpts = ["-Xbinary=memoryModel=experimental", "-opt"]
|
||||||
phaseToCheck = "RemoveRedundantSafepoints"
|
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") {
|
fileCheckTest("filecheck_replace_invoke_with_call") {
|
||||||
|
|||||||
@@ -15,17 +15,21 @@ fun g() = f()
|
|||||||
// CHECK-LABEL: define %struct.ObjHeader* @"kfun:#h(kotlin.Boolean){}kotlin.Any"
|
// CHECK-LABEL: define %struct.ObjHeader* @"kfun:#h(kotlin.Boolean){}kotlin.Any"
|
||||||
@Retain
|
@Retain
|
||||||
fun h(cond: Boolean): Any {
|
fun h(cond: Boolean): Any {
|
||||||
// CHECK: Kotlin_mm_safePointFunctionPrologue
|
// CHECK: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||||
// CHECK-NOT: Kotlin_mm_safePointFunctionPrologue
|
// CHECK-ARM: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||||
|
// CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||||
|
// CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||||
// CHECK: br
|
// CHECK: br
|
||||||
|
// CHECK-ARM: br
|
||||||
if (cond) {
|
if (cond) {
|
||||||
// CHECK: Kotlin_mm_safePointFunctionPrologue
|
// CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||||
// CHECK-NOT: Kotlin_mm_safePointFunctionPrologue
|
// CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||||
// CHECK: br
|
// CHECK: br
|
||||||
|
// CHECK-ARM: br
|
||||||
return listOf(C(), C())
|
return listOf(C(), C())
|
||||||
} else {
|
} else {
|
||||||
// CHECK: Kotlin_mm_safePointFunctionPrologue
|
// CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||||
// CHECK-NOT: Kotlin_mm_safePointFunctionPrologue
|
// CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||||
return listOf(C(), C(), C())
|
return listOf(C(), C(), C())
|
||||||
}
|
}
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
@@ -34,8 +38,10 @@ fun h(cond: Boolean): Any {
|
|||||||
// CHECK-LABEL: define void @"kfun:#main(){}"()
|
// CHECK-LABEL: define void @"kfun:#main(){}"()
|
||||||
@Retain
|
@Retain
|
||||||
fun main() {
|
fun main() {
|
||||||
// CHECK: Kotlin_mm_safePointFunctionPrologue
|
// CHECK: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||||
// CHECK-NOT: Kotlin_mm_safePointFunctionPrologue
|
// CHECK-ARM: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||||
|
// CHECK-NOT: _ZN6kotlin2mm8internal20gSuspensionRequestedE
|
||||||
|
// CHECK-NOT: {{call .*Kotlin_mm_safePointFunctionPrologue}}
|
||||||
println(g())
|
println(g())
|
||||||
println(h(true))
|
println(h(true))
|
||||||
// CHECK: }
|
// CHECK: }
|
||||||
|
|||||||
Reference in New Issue
Block a user