mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-30 17:02:29 +00:00
[AArch64] Slight cleanup in FPLoadBalancing
Instead of the convoluted if-statment we can just use getColor. This also fixes a bug where we relied upon the parity of tablegen-generated register indexes (instead of using the machine encoding). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261990 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1c7f0f6e51
commit
aee2c336ac
@ -530,8 +530,7 @@ int AArch64A57FPLoadBalancing::scavengeRegister(Chain *G, Color C,
|
||||
for (auto Reg : Ord) {
|
||||
if (!AvailableRegs[Reg])
|
||||
continue;
|
||||
if ((C == Color::Even && (Reg % 2) == 0) ||
|
||||
(C == Color::Odd && (Reg % 2) == 1))
|
||||
if (C == getColor(Reg))
|
||||
return Reg;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user