Skip to content

Commit b94a585

Browse files
committed
Fix bug that caused some tests to not be minimal reductions
1 parent 7a0361b commit b94a585

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

zjit/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6158,7 +6158,7 @@ impl Function {
61586158
changed = false;
61596159

61606160
for (row, block) in param_values.iter_mut().zip(&self.blocks) {
6161-
row.resize(block.params.len(), ParamValue::None);
6161+
*row = vec![ParamValue::None; block.params.len()];
61626162
}
61636163

61646164
// Scan through each jump, collecting edges with params to analyze from CondBranch and Jump insns.

zjit/src/hir/opt_tests.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9649,11 +9649,11 @@ mod hir_opt_tests {
96499649
bb6():
96509650
v18:Truthy = RefineType v10, Truthy
96519651
v20:FalseClass = Const Value(false)
9652-
Jump bb5(v9, v18, v20)
9652+
Jump bb5(v18, v20)
96539653
bb4():
96549654
v27:NilClass = Const Value(nil)
9655-
Jump bb5(v9, v16, v27)
9656-
bb5(v29:BasicObject, v30:BasicObject, v31:Falsy):
9655+
Jump bb5(v16, v27)
9656+
bb5(v30:BasicObject, v31:Falsy):
96579657
v36:CBool = HasType v31, FalseClass
96589658
CondBranch v36, bb8(), bb9()
96599659
bb8():
@@ -18597,19 +18597,19 @@ mod hir_opt_tests {
1859718597
CondBranch v17, bb9(), bb4()
1859818598
bb9():
1859918599
v35:Fixnum[0] = Const Value(0)
18600-
Jump bb8(v8, v35)
18601-
bb8(v48:BasicObject, v49:Fixnum):
18602-
v52:Array = RefineType v48, Array
18600+
Jump bb8(v35)
18601+
bb8(v49:Fixnum):
18602+
v52:Array = RefineType v8, Array
1860318603
v53:CInt64 = ArrayLength v52
1860418604
v54:Fixnum = BoxFixnum v53
1860518605
v55:BoolExact = FixnumGe v49, v54
1860618606
v57:CBool = Test v55
1860718607
CondBranch v57, bb11(), bb7()
1860818608
bb11():
1860918609
CheckInterrupts
18610-
Return v48
18610+
Return v8
1861118611
bb7():
18612-
v75:Array = RefineType v48, Array
18612+
v75:Array = RefineType v8, Array
1861318613
v76:CInt64 = UnboxFixnum v49
1861418614
v77:BasicObject = ArrayAref v75, v76
1861518615
v79:CPtr = GetEP 0
@@ -18625,7 +18625,7 @@ mod hir_opt_tests {
1862518625
v92:Fixnum[1] = Const Value(1)
1862618626
v93:Fixnum = FixnumAdd v49, v92
1862718627
PatchPoint NoEPEscape(each)
18628-
Jump bb8(v48, v93)
18628+
Jump bb8(v93)
1862918629
bb4():
1863018630
v28:BasicObject = InvokeBuiltin <inline_expr>, v8
1863118631
CheckInterrupts
@@ -21937,8 +21937,8 @@ mod hir_opt_tests {
2193721937
Jump bb3(v5, v6)
2193821938
bb3(v8:BasicObject, v9:NilClass):
2193921939
v13:Fixnum[0] = Const Value(0)
21940-
Jump bb5(v8, v13)
21941-
bb5(v18:BasicObject, v19:Fixnum):
21940+
Jump bb5(v13)
21941+
bb5(v19:Fixnum):
2194221942
v23:Fixnum[10] = Const Value(10)
2194321943
PatchPoint MethodRedefined(Integer@0x1000, <@0x1008, cme:0x1010)
2194421944
v58:BoolExact = FixnumLt v19, v23
@@ -21949,7 +21949,7 @@ mod hir_opt_tests {
2194921949
v48:Fixnum[1] = Const Value(1)
2195021950
PatchPoint MethodRedefined(Integer@0x1000, +@0x1038, cme:0x1040)
2195121951
v62:Fixnum = FixnumAdd v19, v48
21952-
Jump bb5(v18, v62)
21952+
Jump bb5(v62)
2195321953
bb6():
2195421954
CheckInterrupts
2195521955
Return v19

0 commit comments

Comments
 (0)