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 | 66401c90da414bcaf91a3fb057231dc46746a2ad (patch) | |
tree | bfb68e028dbf926ccc70092020c70123f1c331e7 /llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | |
parent | ffe14e37121c57e01347e0fcfbc072482b407700 (diff) | |
download | bcm5719-llvm-66401c90da414bcaf91a3fb057231dc46746a2ad.tar.gz bcm5719-llvm-66401c90da414bcaf91a3fb057231dc46746a2ad.zip |
When expanding t2STRDi8 r, r to two stores, add kill markers correctly.
llvm-svn: 88734
Diffstat (limited to 'llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index 873a8d3cfee..304d0ef6624 100644 --- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/llvm/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, |