Skip to content

Commit 603c5cb

Browse files
committed
Remove allocation and elide a test that is no longer relevant
1 parent b94a585 commit 603c5cb

2 files changed

Lines changed: 2 additions & 22 deletions

File tree

zjit/src/hir.rs

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

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

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

zjit/src/hir/opt_tests.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19235,27 +19235,6 @@ mod hir_opt_tests {
1923519235
");
1923619236
}
1923719237

19238-
#[test]
19239-
fn test_dedup_guard_type_across_cfg_join() {
19240-
eval("
19241-
def test(n, cond)
19242-
if cond
19243-
a = n + 1
19244-
else
19245-
a = n + 2
19246-
end
19247-
n + a
19248-
end
19249-
test(1, true); test(1, false)
19250-
");
19251-
let hir = hir_string("test");
19252-
let guard_count = hir.matches("GuardType").count();
19253-
assert_eq!(
19254-
guard_count, 2,
19255-
"expected 2 GuardType instructions after cross-block dedup, found {guard_count}\n\nHIR:\n{hir}"
19256-
);
19257-
}
19258-
1925919238
#[test]
1926019239
fn test_forward_guard_through_conditional_branch() {
1926119240
eval("

0 commit comments

Comments
 (0)