aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-02-22 14:47:49 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-02-22 14:47:49 +0000
commitd58b976bb7a38fa438c06782827d25d266af81e5 (patch)
tree80fc078d50ca7351134216e67006565f6d65e546 /llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
parent451f54cf62347d80cd0de6f5597010137b787d00 (diff)
downloadllvm-d58b976bb7a38fa438c06782827d25d266af81e5.zip
llvm-d58b976bb7a38fa438c06782827d25d266af81e5.tar.gz
llvm-d58b976bb7a38fa438c06782827d25d266af81e5.tar.bz2
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
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCFrameLowering.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCFrameLowering.cpp2
1 files changed, 1 insertions, 1 deletions
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;