diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-02-28 02:55:02 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-02-28 02:55:02 +0000 |
commit | 44b6c715ac87505f98066fa3bf6e3e99a26b886a (patch) | |
tree | 1ed886d9d780808668b543c30dc21d16a35bbf79 /lib/Target/Mips/MipsISelDAGToDAG.cpp | |
parent | 2129a0f6773b3625ddc5d541fe454a9a923cec2a (diff) | |
download | llvm-44b6c715ac87505f98066fa3bf6e3e99a26b886a.tar.gz llvm-44b6c715ac87505f98066fa3bf6e3e99a26b886a.tar.bz2 llvm-44b6c715ac87505f98066fa3bf6e3e99a26b886a.tar.xz |
Add support for floating point base register + offset register addressing mode
load and store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/Mips/MipsISelDAGToDAG.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsISelDAGToDAG.cpp b/lib/Target/Mips/MipsISelDAGToDAG.cpp index 281399e84e..f60a15e9e5 100644 --- a/lib/Target/Mips/MipsISelDAGToDAG.cpp +++ b/lib/Target/Mips/MipsISelDAGToDAG.cpp @@ -30,6 +30,7 @@ #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/SelectionDAGISel.h" +#include "llvm/CodeGen/SelectionDAGNodes.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -91,7 +92,7 @@ private: SDNode *Select(SDNode *N); // Complex Pattern. - bool SelectAddr(SDValue N, SDValue &Base, SDValue &Offset); + bool SelectAddr(SDNode *Parent, SDValue N, SDValue &Base, SDValue &Offset); // getImm - Return a target constant with the specified value. inline SDValue getImm(const SDNode *Node, unsigned Imm) { @@ -197,7 +198,7 @@ SDNode *MipsDAGToDAGISel::getGlobalBaseReg() { /// ComplexPattern used on MipsInstrInfo /// Used on Mips Load/Store instructions bool MipsDAGToDAGISel:: -SelectAddr(SDValue Addr, SDValue &Base, SDValue &Offset) { +SelectAddr(SDNode *Parent, SDValue Addr, SDValue &Base, SDValue &Offset) { EVT ValTy = Addr.getValueType(); // if Address is FI, get the TargetFrameIndex. @@ -256,6 +257,12 @@ SelectAddr(SDValue Addr, SDValue &Base, SDValue &Offset) { return true; } } + + // If an indexed load/store can be emitted, return false. + if (const LSBaseSDNode* LS = dyn_cast<LSBaseSDNode>(Parent)) + if ((LS->getMemoryVT() == MVT::f32 || LS->getMemoryVT() == MVT::f64) && + Subtarget.hasMips32r2Or64()) + return false; } Base = Addr; |