diff options
author | Owen Anderson <resistor@mac.com> | 2011-03-29 20:27:38 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-03-29 20:27:38 +0000 |
commit | d0cfc99b308a805ffc130cde7317a0b0c626348f (patch) | |
tree | 8c745b987443a44b49a918f0e0af56cf97970962 /lib/Target/ARM/ARMLoadStoreOptimizer.cpp | |
parent | 9eda569a74377bdcf8ce6073682fb9a4bd8a82ca (diff) |
Check early if this is an unsupported opcode, so that we can avoid needlessly instantiating the base register in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
-rw-r--r-- | lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index 0dab835f7c..838f20f4b7 100644 --- a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -308,6 +308,10 @@ ARMLoadStoreOpt::MergeOps(MachineBasicBlock &MBB, // VLDM/VSTM do not support DB mode without also updating the base reg. Mode = ARM_AM::db; else if (Offset != 0) { + // Check if this is a supported opcode before we insert instructions to + // calculate a new base register. + if (!getLoadStoreMultipleOpcode(Opcode, Mode)) return false; + // If starting offset isn't zero, insert a MI to materialize a new base. // But only do so if it is cost effective, i.e. merging more than two // loads / stores. |