diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-03-04 21:04:38 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-03-04 21:04:38 +0000 |
commit | bbf39b0fd9c83f1d46ca5f858e66de66fb64ec98 (patch) | |
tree | 2422206384607564bf01d63db23cda480a2c3146 /lib/Target | |
parent | d4076cfc834da5255d2f7a15b6f9c7cd80132223 (diff) | |
download | external_llvm-bbf39b0fd9c83f1d46ca5f858e66de66fb64ec98.zip external_llvm-bbf39b0fd9c83f1d46ca5f858e66de66fb64ec98.tar.gz external_llvm-bbf39b0fd9c83f1d46ca5f858e66de66fb64ec98.tar.bz2 |
pr6480: Don't try producing ld/st-multiple instructions when the address is
an undef value. This is only going to come up for bugpoint-reduced tests --
correct programs will not access memory at undefined addresses -- so it's not
worth the effort of doing anything more aggressive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index 5b4f02d..19f1e3b 100644 --- a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -761,6 +761,11 @@ static bool isMemoryOp(const MachineInstr *MI) { MI->getOperand(0).isUndef()) return false; + // Likewise don't mess with references to undefined addresses. + if (MI->getNumOperands() > 1 && MI->getOperand(1).isReg() && + MI->getOperand(1).isUndef()) + return false; + int Opcode = MI->getOpcode(); switch (Opcode) { default: break; |