1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

Fix LivePhysRegs::addLiveOuts

Summary:
The testing for returnBB was flipped which may cause ARM ld/st opt pass uses callee saved regs in returnBB when shrink-wrap is used.


Reviewers: t.p.northover, apazos, MatzeB

Subscribers: mcrosier, zzheng, aemerson, llvm-commits, rengolin

Differential Revision: http://reviews.llvm.org/D16434

llvm-svn: 258569
This commit is contained in:
Weiming Zhao 2016-01-22 22:21:34 +00:00
parent 40baae90ce
commit e73494fde9

View File

@ -151,7 +151,7 @@ void LivePhysRegs::addLiveOuts(const MachineBasicBlock *MBB,
if (AddPristinesAndCSRs) {
const MachineFunction &MF = *MBB->getParent();
addPristines(*this, MF, *TRI);
if (!MBB->isReturnBlock()) {
if (MBB->isReturnBlock()) {
// The return block has no successors whose live-ins we could merge
// below. So instead we add the callee saved registers manually.
for (const MCPhysReg *I = TRI->getCalleeSavedRegs(&MF); *I; ++I)