diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2009-11-14 01:50:00 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2009-11-14 01:50:00 +0000 |
| commit | 770b4d6907dab297589a12d3bf89f926c0b400e9 (patch) | |
| tree | a06b650eb18e721c0fe20c6012b572b310a67bf4 /lib/Target/ARM | |
| parent | 257ed14adea832ee52d55613bd9f8ce3d2a8f43d (diff) | |
| download | external_llvm-770b4d6907dab297589a12d3bf89f926c0b400e9.zip external_llvm-770b4d6907dab297589a12d3bf89f926c0b400e9.tar.gz external_llvm-770b4d6907dab297589a12d3bf89f926c0b400e9.tar.bz2 | |
When expanding t2STRDi8 r, r to two stores, add kill markers correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
| -rw-r--r-- | lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index 873a8d3..304d0ef 100644 --- a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -866,6 +866,13 @@ bool ARMLoadStoreOpt::FixInvalidRegPairOp(MachineBasicBlock &MBB, BaseReg, BaseKill, BaseUndef, OffReg, OffKill, OffUndef, Pred, PredReg, TII, isT2); } else { + if (OddReg == EvenReg && EvenDeadKill) { + // If the two source operands are the same, the kill marker is probably + // on the first one. e.g. + // t2STRDi8 %R5<kill>, %R5, %R9<kill>, 0, 14, %reg0 + EvenDeadKill = false; + OddDeadKill = true; + } InsertLDR_STR(MBB, MBBI, OffImm, isLd, dl, NewOpc, EvenReg, EvenDeadKill, EvenUndef, BaseReg, false, BaseUndef, OffReg, false, OffUndef, |
