Make sure that encodings has entries for all instructions after legalize().
If we generated new instructions as part of legalize, and the new instructions failed to legalize, we'd be left with a func.encodings[] that would panic when you dereferenced the inst.
This commit is contained in:
committed by
Jakob Stoklund Olesen
parent
d47f43df11
commit
440add86e7
@@ -100,6 +100,7 @@ pub fn legalize_function(func: &mut Function, cfg: &mut ControlFlowGraph, isa: &
|
||||
prev_pos = pos.position();
|
||||
}
|
||||
}
|
||||
func.encodings.resize(func.dfg.num_insts());
|
||||
}
|
||||
|
||||
// Include legalization patterns that were generated by `gen_legalizer.py` from the `XForms` in
|
||||
|
||||
Reference in New Issue
Block a user