summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-05 14:02:01 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-05 14:02:01 +0000
commit8976ea72ab70254e6bbe5fce2b75b316a45b540b (patch)
tree5c999e8ddb1661b6ff31a03647ca4633aa425e24 /llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
parentb2044311063c36eb4139549c00d84ab19ff2ed5c (diff)
downloadbcm5719-llvm-8976ea72ab70254e6bbe5fce2b75b316a45b540b.tar.gz
bcm5719-llvm-8976ea72ab70254e6bbe5fce2b75b316a45b540b.zip
[SystemZ] Enable the use of MVC for frame-to-frame spills
...now that the problem that prompted the restriction has been fixed. The original spill-02.py was a compromise because at the time I couldn't find an example that actually failed without the two scavenging slots. The version included here did. llvm-svn: 185701
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
index 16207b33b67..12bcd094f48 100644
--- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
@@ -363,18 +363,11 @@ SystemZInstrInfo::foldMemoryOperandImpl(MachineFunction &MF,
// not valid in cases where the two memories partially overlap; however,
// that is not a problem here, because we know that one of the memories
// is a full frame index.
- //
- // For now we punt if the load or store is also to a frame index.
- // In that case we might end up eliminating both of them to out-of-range
- // offsets, which might then force the register scavenger to spill two
- // other registers. The backend can only handle one such scavenger spill
- // at a time.
if (OpNum == 0 && MI->hasOneMemOperand()) {
MachineMemOperand *MMO = *MI->memoperands_begin();
if (MMO->getSize() == Size && !MMO->isVolatile()) {
// Handle conversion of loads.
- if (isSimpleBD12Move(MI, SystemZII::SimpleBDXLoad) &&
- !MI->getOperand(1).isFI()) {
+ if (isSimpleBD12Move(MI, SystemZII::SimpleBDXLoad)) {
uint64_t Offset = 0;
MachineMemOperand *FrameMMO = getFrameMMO(MF, FrameIndex, Offset,
MachineMemOperand::MOStore);
@@ -384,8 +377,7 @@ SystemZInstrInfo::foldMemoryOperandImpl(MachineFunction &MF,
.addMemOperand(FrameMMO).addMemOperand(MMO);
}
// Handle conversion of stores.
- if (isSimpleBD12Move(MI, SystemZII::SimpleBDXStore) &&
- !MI->getOperand(1).isFI()) {
+ if (isSimpleBD12Move(MI, SystemZII::SimpleBDXStore)) {
uint64_t Offset = 0;
MachineMemOperand *FrameMMO = getFrameMMO(MF, FrameIndex, Offset,
MachineMemOperand::MOLoad);
OpenPOWER on IntegriCloud