machinst/x64: teach regalloc what FP instructions are moves;

and cosmetic changes after #1665 landed.
This commit is contained in:
Benjamin Bouvier
2020-06-10 18:37:45 +02:00
parent 0303834082
commit ef5de04d32
3 changed files with 9 additions and 9 deletions

View File

@@ -137,13 +137,10 @@ impl<I: VCodeInst> VCodeBuilder<I> {
/// Set the type of a VReg.
pub fn set_vreg_type(&mut self, vreg: VirtualReg, ty: Type) {
if self.vcode.vreg_types.len() <= vreg.get_index() {
self.vcode.vreg_types.resize(
self.vcode.vreg_types.len()
+ ((vreg.get_index() + 1) - self.vcode.vreg_types.len()),
ir::types::I8,
)
self.vcode
.vreg_types
.resize(vreg.get_index() + 1, ir::types::I8);
}
self.vcode.vreg_types[vreg.get_index()] = ty;
}