get_set_elimination_pass: Eliminate unnecessary gets/sets of extended registers

This commit is contained in:
MerryMage 2016-08-23 14:51:46 +01:00
parent e0f9dead5d
commit c8b2f63c93
2 changed files with 51 additions and 1 deletions

View file

@ -119,7 +119,9 @@ Gen::X64Reg RegAlloc::UseDefRegister(IR::Inst* use_inst, IR::Inst* def_inst, Hos
}
}
bool is_floating_point = use_inst->GetType() == IR::Type::F32 || use_inst->GetType() == IR::Type::F64;
bool is_floating_point = HostLocIsXMM(*desired_locations.begin());
if (is_floating_point)
DEBUG_ASSERT(use_inst->GetType() == IR::Type::F32 || use_inst->GetType() == IR::Type::F64);
Gen::X64Reg use_reg = UseRegister(use_inst, is_floating_point ? any_xmm : any_gpr);
Gen::X64Reg def_reg = DefRegister(def_inst, desired_locations);
if (is_floating_point) {