arm64/reg_alloc: Bugfix in ValueInfo

This commit is contained in:
Merry 2022-07-31 08:50:27 +01:00 committed by merry
parent 6dfd94f3fb
commit 23c23fbca3

View file

@ -489,13 +489,13 @@ HostLocInfo& RegAlloc::ValueInfo(const IR::Inst* value) {
if (const auto iter = std::find_if(gprs.begin(), gprs.end(), contains_value); iter != gprs.end()) { if (const auto iter = std::find_if(gprs.begin(), gprs.end(), contains_value); iter != gprs.end()) {
return *iter; return *iter;
} }
if (const auto iter = std::find_if(fprs.begin(), fprs.end(), contains_value); iter != gprs.end()) { if (const auto iter = std::find_if(fprs.begin(), fprs.end(), contains_value); iter != fprs.end()) {
return *iter; return *iter;
} }
if (contains_value(flags)) { if (contains_value(flags)) {
return flags; return flags;
} }
if (const auto iter = std::find_if(spills.begin(), spills.end(), contains_value); iter != gprs.end()) { if (const auto iter = std::find_if(spills.begin(), spills.end(), contains_value); iter != spills.end()) {
return *iter; return *iter;
} }
ASSERT_FALSE("RegAlloc::ValueInfo: Value not found"); ASSERT_FALSE("RegAlloc::ValueInfo: Value not found");