diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-02-08 21:20:40 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-02-08 21:20:40 +0000 |
commit | 3b3286d4bc09950a4c492fa35531ea31431c6eb5 (patch) | |
tree | 31743b65be1fe7916fb75c9468b429a12adb685e /llvm/lib/Target/ARM | |
parent | b54312d5a0ef707c91233d4f75d3d048e5b66d05 (diff) | |
download | bcm5719-llvm-3b3286d4bc09950a4c492fa35531ea31431c6eb5.tar.gz bcm5719-llvm-3b3286d4bc09950a4c492fa35531ea31431c6eb5.zip |
It's not always safe to fold movsd into xorpd, etc. Check the alignment of the load address first to make sure it's 16 byte aligned.
llvm-svn: 46893
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrInfo.cpp | 9 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrInfo.h | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.cpp b/llvm/lib/Target/ARM/ARMInstrInfo.cpp index 9ecd7c76bcf..4d1819de873 100644 --- a/llvm/lib/Target/ARM/ARMInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMInstrInfo.cpp @@ -640,9 +640,10 @@ bool ARMInstrInfo::restoreCalleeSavedRegisters(MachineBasicBlock &MBB, return true; } -MachineInstr *ARMInstrInfo::foldMemoryOperand(MachineInstr *MI, - SmallVectorImpl<unsigned> &Ops, - int FI) const { +MachineInstr *ARMInstrInfo::foldMemoryOperand(MachineFunction &MF, + MachineInstr *MI, + SmallVectorImpl<unsigned> &Ops, + int FI) const { if (Ops.size() != 1) return NULL; unsigned OpNum = Ops[0]; @@ -721,7 +722,7 @@ MachineInstr *ARMInstrInfo::foldMemoryOperand(MachineInstr *MI, } bool ARMInstrInfo::canFoldMemoryOperand(MachineInstr *MI, - SmallVectorImpl<unsigned> &Ops) const { + SmallVectorImpl<unsigned> &Ops) const { if (Ops.size() != 1) return false; unsigned OpNum = Ops[0]; diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.h b/llvm/lib/Target/ARM/ARMInstrInfo.h index 60d9640b8da..31216e49eba 100644 --- a/llvm/lib/Target/ARM/ARMInstrInfo.h +++ b/llvm/lib/Target/ARM/ARMInstrInfo.h @@ -191,11 +191,13 @@ public: MachineBasicBlock::iterator MI, const std::vector<CalleeSavedInfo> &CSI) const; - virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, + virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, + MachineInstr* MI, SmallVectorImpl<unsigned> &Ops, int FrameIndex) const; - virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, + virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, + MachineInstr* MI, SmallVectorImpl<unsigned> &Ops, MachineInstr* LoadMI) const { return 0; |