diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-03-01 22:57:32 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-03-01 22:57:32 +0000 |
| commit | 693225f04a7199ef04ff25ee031bfe71afe0ea50 (patch) | |
| tree | 522b20eeafd44c701f988c724d3f33f583d0eb90 /llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp | |
| parent | 946660332241d3524bd85fa4f63bf5041de44e24 (diff) | |
| download | bcm5719-llvm-693225f04a7199ef04ff25ee031bfe71afe0ea50.tar.gz bcm5719-llvm-693225f04a7199ef04ff25ee031bfe71afe0ea50.zip | |
Handle regmasks in Thumb1RegisterInfo::saveScavengerRegister().
This function could have r12 live across a function call when compiling
thumb1 code.
The test case for this is not included because it is very long. It must
provoke emergency spilling near a function call. The behavior is
provoked by MultiSource/Applications/JM/lencod, and it triggers an
assertion in the scavenger.
<rdar://problem/10963642>
llvm-svn: 151855
Diffstat (limited to 'llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp b/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp index 1613acd7a60..6b8bf0e6398 100644 --- a/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp +++ b/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp @@ -571,6 +571,11 @@ Thumb1RegisterInfo::saveScavengerRegister(MachineBasicBlock &MBB, // If this instruction affects R12, adjust our restore point. for (unsigned i = 0, e = II->getNumOperands(); i != e; ++i) { const MachineOperand &MO = II->getOperand(i); + if (MO.isRegMask() && MO.clobbersPhysReg(ARM::R12)) { + UseMI = II; + done = true; + break; + } if (!MO.isReg() || MO.isUndef() || !MO.getReg() || TargetRegisterInfo::isVirtualRegister(MO.getReg())) continue; |

