From: Nemanja Ivanovic Date: Mon, 22 Feb 2016 14:47:49 +0000 (+0000) Subject: Fix for PR26690 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d58b976bb7a38fa438c06782827d25d266af81e5;p=platform%2Fupstream%2Fllvm.git Fix for PR26690 I mistook BitVector::empty() to mean BitVector::count() == 0 and it does not. Corrected the issue with the fix for PR26500. llvm-svn: 261525 --- diff --git a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp index 92031d3..e8a8b71 100644 --- a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp @@ -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;