Fix for PR26690
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 22 Feb 2016 14:47:49 +0000 (14:47 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 22 Feb 2016 14:47:49 +0000 (14:47 +0000)
I mistook BitVector::empty() to mean BitVector::count() == 0 and it does
not. Corrected the issue with the fix for PR26500.

llvm-svn: 261525

llvm/lib/Target/PowerPC/PPCFrameLowering.cpp

index 92031d3..e8a8b71 100644 (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;