summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-07-14 18:45:35 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-07-14 18:45:35 +0000
commit8f324a2cc827d4f5ea2ac94609e3b6054aba7617 (patch)
tree9d6d2a040d600ac135e98522a816460d1368651b /llvm/lib/CodeGen
parentb50e716bac45a9713144869b01c2850ef8048100 (diff)
downloadbcm5719-llvm-8f324a2cc827d4f5ea2ac94609e3b6054aba7617.tar.gz
bcm5719-llvm-8f324a2cc827d4f5ea2ac94609e3b6054aba7617.zip
Account for early-clobber reload instructions.
No test case, there are no in-tree targets that require this. llvm-svn: 160219
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/InlineSpiller.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp
index 4c7f5d8c88c..07e37af57f3 100644
--- a/llvm/lib/CodeGen/InlineSpiller.cpp
+++ b/llvm/lib/CodeGen/InlineSpiller.cpp
@@ -1081,6 +1081,10 @@ void InlineSpiller::insertReload(LiveInterval &NewLI,
MRI.getRegClass(NewLI.reg), &TRI);
--MI; // Point to load instruction.
SlotIndex LoadIdx = LIS.InsertMachineInstrInMaps(MI).getRegSlot();
+ // Some (out-of-tree) targets have EC reload instructions.
+ if (MachineOperand *MO = MI->findRegisterDefOperand(NewLI.reg))
+ if (MO->isEarlyClobber())
+ LoadIdx = LoadIdx.getRegSlot(true);
DEBUG(dbgs() << "\treload: " << LoadIdx << '\t' << *MI);
VNInfo *LoadVNI = NewLI.getNextValue(LoadIdx, LIS.getVNInfoAllocator());
NewLI.addRange(LiveRange(LoadIdx, Idx, LoadVNI));
OpenPOWER on IntegriCloud