[K/N][Tests] Adapt test single_tls_load.kt to optional inline of EnterFrame
This commit is contained in:
committed by
Space Team
parent
3c8e7bdfb1
commit
b78455093e
@@ -5,7 +5,14 @@ class Wrapper(x: Int)
|
||||
|
||||
// CHECK-LABEL: define internal fastcc %struct.ObjHeader* @"kfun:#f(kotlin.Int;kotlin.String){}kotlin.String"
|
||||
fun f(x: Int, s: String): String {
|
||||
// CHECK: _ZN6kotlin2mm14ThreadRegistry22currentThreadDataNode_E
|
||||
// https://youtrack.jetbrains.com/issue/KT-64880/K-N-EnterFrame-runtime-function-should-be-always-inlined-in-OPT-mode
|
||||
// Remove `|call fastcc void @EnterFrame` below, after KT-64880 is fixed
|
||||
// `call .. @EnterFrame` may or may not be inlined.
|
||||
// - in case it would be inlined, several `load .. currentThreadDataNode` would happen, and only first of them must stay
|
||||
// after `OptimizeTLSDataLoads` optimizaion phase.
|
||||
// - in case of no-inline, several `call .. @EnterFrame` may remain in function code.
|
||||
|
||||
// CHECK: {{_ZN6kotlin2mm14ThreadRegistry22currentThreadDataNode_E|call fastcc void @EnterFrame}}
|
||||
// CHECK-NOT: _ZN6kotlin2mm14ThreadRegistry22currentThreadDataNode_E
|
||||
if (x < 0) throw IllegalStateException()
|
||||
if (x > 0) return f(x - 1, s)
|
||||
|
||||
Reference in New Issue
Block a user