Fix for PR26690

I mistook BitVector::empty() to mean BitVector::count() == 0 and it does
not. Corrected the issue with the fix for PR26500.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261525 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nemanja Ivanovic 2016-02-22 14:47:49 +00:00
parent b0ce7c7fb5
commit 6bf5860c4e

View File

@ -653,7 +653,7 @@ PPCFrameLowering::findScratchRegister(MachineBasicBlock *MBB,
// Now that we've done our best to provide both registers, double check
// whether we were unable to provide enough.
if (BV.empty() || (BV.count() < 2 && TwoUniqueRegsRequired))
if (BV.count() < TwoUniqueRegsRequired ? 2 : 1)
return false;
return true;