File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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("
You can’t perform that action at this time.
0 commit comments