cranelift: Resize with types::INVALID isntead of types::I8 (#5227)

This commit is contained in:
Trevor Elliott
2022-11-08 12:42:20 -08:00
committed by GitHub
parent d94173ea09
commit 70bca801ab

View File

@@ -1408,7 +1408,7 @@ impl<I: VCodeInst> VRegAllocator<I> {
/// Set the type of this virtual register. /// Set the type of this virtual register.
pub fn set_vreg_type(&mut self, vreg: VirtualReg, ty: Type) { pub fn set_vreg_type(&mut self, vreg: VirtualReg, ty: Type) {
if self.vreg_types.len() <= vreg.index() { if self.vreg_types.len() <= vreg.index() {
self.vreg_types.resize(vreg.index() + 1, ir::types::I8); self.vreg_types.resize(vreg.index() + 1, ir::types::INVALID);
} }
self.vreg_types[vreg.index()] = ty; self.vreg_types[vreg.index()] = ty;
if is_reftype(ty) { if is_reftype(ty) {