Skip to content

Commit 58e8651

Browse files
yoneymeta-codesync[bot]
authored andcommitted
Add missing 3.14t HIR expectations for static JIT tests
Summary: Add free-threaded HIR expectations for `IntFieldInitNoRefCount` and `InlinedStoreFieldLoadFieldIsEliminated`. Reviewed By: alexmalyshev Differential Revision: D114595085 fbshipit-source-id: c81cc51f3f48197dff4aa9527dafcf7538b4f6e0
1 parent 56e519f commit 58e8651

2 files changed

Lines changed: 123 additions & 0 deletions

File tree

cinderx/RuntimeTests/hir_tests/inliner_elimination_static_test.txt

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,4 +1360,97 @@ fun jittestmodule:test {
13601360
Return<CInt8> v23
13611361
}
13621362
}
1363+
--- Expected 3.14t ---
1364+
fun jittestmodule:test {
1365+
bb 0 {
1366+
v8:Func = LoadCurrentFunc
1367+
LoadFrame
1368+
Snapshot
1369+
AtQuiescentState
1370+
v9:CInt64 = LoadEvalBreaker
1371+
CondBranch<2, 1> v9
1372+
}
1373+
1374+
bb 2 (preds 0) {
1375+
Snapshot
1376+
v15:CInt32 = RunPeriodicTasks {
1377+
FrameState {
1378+
CurInstrOffset 0
1379+
}
1380+
}
1381+
Branch<1>
1382+
}
1383+
1384+
bb 1 (preds 0, 2) {
1385+
Snapshot
1386+
v10:ObjectUser[C:Exact] = TpAlloc<C> {
1387+
FrameState {
1388+
CurInstrOffset 2
1389+
}
1390+
}
1391+
Snapshot
1392+
v11:MortalFunc[function:0xdeadbeef] = LoadConst<MortalFunc[function:0xdeadbeef]>
1393+
BeginInlinedFunction<jittestmodule:C.__init__> {
1394+
CurInstrOffset 8
1395+
Stack<1> v10
1396+
}
1397+
v38:ObjectUser[C:Exact] = TagIfDeferred v10
1398+
Snapshot
1399+
AtQuiescentState
1400+
v39:CInt64 = LoadEvalBreaker
1401+
CondBranch<10, 9> v39
1402+
}
1403+
1404+
bb 10 (preds 1) {
1405+
Snapshot
1406+
v45:CInt32 = RunPeriodicTasks {
1407+
FrameState {
1408+
CurInstrOffset 0
1409+
Locals<1> v38
1410+
}
1411+
}
1412+
Branch<9>
1413+
}
1414+
1415+
bb 9 (preds 1, 10) {
1416+
Snapshot
1417+
v40:CInt8[4] = LoadConst<CInt8[4]>
1418+
v41:Nullptr = LoadConst<Nullptr>
1419+
UseType<CInt8> v40
1420+
StoreField<foo@32> v38 v40 v41
1421+
Snapshot
1422+
v43:ImmortalNoneType = LoadConst<ImmortalNoneType>
1423+
EndInlinedFunction
1424+
Snapshot
1425+
v13:MortalFunc[function:0xdeadbeef] = LoadConst<MortalFunc[function:0xdeadbeef]>
1426+
BeginInlinedFunction<jittestmodule:C.getfoo> {
1427+
CurInstrOffset 14
1428+
}
1429+
v23:ObjectUser[C:Exact] = TagIfDeferred v10
1430+
Snapshot
1431+
AtQuiescentState
1432+
v24:CInt64 = LoadEvalBreaker
1433+
CondBranch<5, 4> v24
1434+
}
1435+
1436+
bb 5 (preds 9) {
1437+
Snapshot
1438+
v27:CInt32 = RunPeriodicTasks {
1439+
FrameState {
1440+
CurInstrOffset 0
1441+
Locals<1> v23
1442+
}
1443+
}
1444+
Branch<4>
1445+
}
1446+
1447+
bb 4 (preds 5, 9) {
1448+
Snapshot
1449+
v25:CInt8 = LoadField<foo@32, CInt8, borrowed> v23
1450+
Snapshot
1451+
EndInlinedFunction
1452+
Snapshot
1453+
Return<CInt8> v25
1454+
}
1455+
}
13631456
--- End ---

cinderx/RuntimeTests/hir_tests/refcount_insertion_static_test.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,36 @@ fun jittestmodule:Test.__init__ {
124124
Return<NoneType> v14
125125
}
126126
}
127+
--- Expected 3.14t ---
128+
fun jittestmodule:Test.__init__ {
129+
bb 0 {
130+
v9:User[Test] = LoadArg<0; "self", User[Test]>
131+
LoadFrame
132+
v11:User[Test] = TagIfDeferred v9
133+
AtQuiescentState
134+
v12:CInt64 = LoadEvalBreaker
135+
CondBranch<2, 1> v12
136+
}
137+
138+
bb 2 (preds 0) {
139+
v18:CInt32 = RunPeriodicTasks {
140+
LiveValues<1> b:v11
141+
FrameState {
142+
CurInstrOffset 0
143+
Locals<1> v11
144+
}
145+
}
146+
Branch<1>
147+
}
148+
149+
bb 1 (preds 0, 2) {
150+
v13:CInt32[0] = LoadConst<CInt32[0]>
151+
v14:Nullptr = LoadConst<Nullptr>
152+
StoreField<x@32> v11 v13 v14
153+
v16:ImmortalNoneType = LoadConst<ImmortalNoneType>
154+
Return<NoneType> v16
155+
}
156+
}
127157
--- Test Name ---
128158
StoreFieldIncRef
129159
--- Input ---

0 commit comments

Comments
 (0)