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/Sparc | |
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/Sparc')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrInfo.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrInfo.h | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp index 56727bb56cd..79fc9129190 100644 --- a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp +++ b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp @@ -222,9 +222,10 @@ void SparcInstrInfo::loadRegFromAddr(MachineFunction &MF, unsigned DestReg, return; } -MachineInstr *SparcInstrInfo::foldMemoryOperand(MachineInstr* MI, - SmallVectorImpl<unsigned> &Ops, - int FI) const { +MachineInstr *SparcInstrInfo::foldMemoryOperand(MachineFunction &MF, + MachineInstr* MI, + SmallVectorImpl<unsigned> &Ops, + int FI) const { if (Ops.size() != 1) return NULL; unsigned OpNum = Ops[0]; diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.h b/llvm/lib/Target/Sparc/SparcInstrInfo.h index 0ed7fab4ed4..14c3b4a254f 100644 --- a/llvm/lib/Target/Sparc/SparcInstrInfo.h +++ b/llvm/lib/Target/Sparc/SparcInstrInfo.h @@ -94,11 +94,13 @@ public: const TargetRegisterClass *RC, SmallVectorImpl<MachineInstr*> &NewMIs) 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; |