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 | 4f2f3f6dce7d350282947012884573f9ef19677c (patch) | |
| tree | 9f139c1da990cd358750d0edaaef90f8ad1ff505 /lib/Target/CellSPU | |
| parent | a58b8626004d5ee61e060ac70b536a4ccb2ea03f (diff) | |
| download | external_llvm-4f2f3f6dce7d350282947012884573f9ef19677c.zip external_llvm-4f2f3f6dce7d350282947012884573f9ef19677c.tar.gz external_llvm-4f2f3f6dce7d350282947012884573f9ef19677c.tar.bz2 | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CellSPU')
| -rw-r--r-- | lib/Target/CellSPU/SPUInstrInfo.cpp | 7 | ||||
| -rw-r--r-- | lib/Target/CellSPU/SPUInstrInfo.h | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/Target/CellSPU/SPUInstrInfo.cpp b/lib/Target/CellSPU/SPUInstrInfo.cpp index ac9b9b8..64f6225 100644 --- a/lib/Target/CellSPU/SPUInstrInfo.cpp +++ b/lib/Target/CellSPU/SPUInstrInfo.cpp @@ -391,9 +391,10 @@ void SPUInstrInfo::loadRegFromAddr(MachineFunction &MF, unsigned DestReg, /// foldMemoryOperand - SPU, like PPC, can only fold spills into /// copy instructions, turning them into load/store instructions. MachineInstr * -SPUInstrInfo::foldMemoryOperand(MachineInstr *MI, - SmallVectorImpl<unsigned> &Ops, - int FrameIndex) const +SPUInstrInfo::foldMemoryOperand(MachineFunction &MF, + MachineInstr *MI, + SmallVectorImpl<unsigned> &Ops, + int FrameIndex) const { #if SOMEDAY_SCOTT_LOOKS_AT_ME_AGAIN if (Ops.size() != 1) return NULL; diff --git a/lib/Target/CellSPU/SPUInstrInfo.h b/lib/Target/CellSPU/SPUInstrInfo.h index 10c39a0..39237ee 100644 --- a/lib/Target/CellSPU/SPUInstrInfo.h +++ b/lib/Target/CellSPU/SPUInstrInfo.h @@ -77,12 +77,14 @@ namespace llvm { SmallVectorImpl<MachineInstr*> &NewMIs) const; //! Fold spills into load/store instructions - virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, + virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, + MachineInstr* MI, SmallVectorImpl<unsigned> &Ops, int FrameIndex) const; //! Fold any load/store to an operand - virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, + virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, + MachineInstr* MI, SmallVectorImpl<unsigned> &Ops, MachineInstr* LoadMI) const { return 0; |
