From 92d57cee611aba67256257b2185f33dae8181410 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Wed, 18 Aug 2010 23:56:46 +0000 Subject: [PATCH] Don't call Predicate_* in Mips. llvm-svn: 111468 --- llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp | 6 +++--- llvm/lib/Target/Mips/MipsInstrInfo.td | 7 +------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp b/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp index 3888bbf09ec7..def8cf83180e 100644 --- a/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp +++ b/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp @@ -137,7 +137,7 @@ SelectAddr(SDNode *Op, SDValue Addr, SDValue &Offset, SDValue &Base) // Operand is a result from an ADD. if (Addr.getOpcode() == ISD::ADD) { if (ConstantSDNode *CN = dyn_cast(Addr.getOperand(1))) { - if (Predicate_immSExt16(CN)) { + if (isInt<16>(CN->getSExtValue())) { // If the first operand is a FI, get the TargetFI Node if (FrameIndexSDNode *FIN = dyn_cast @@ -248,8 +248,8 @@ SDNode *MipsDAGToDAGISel::SelectStoreFp64(SDNode *N) { SDValue Chain = N->getOperand(0); - if (!Predicate_unindexedstore(N) || - !Predicate_store(N)) + StoreSDNode *SN = cast(N); + if (SN->isTruncatingStore() || SN->getAddressingMode() != ISD::UNINDEXED) return NULL; SDValue N1 = N->getOperand(1); diff --git a/llvm/lib/Target/Mips/MipsInstrInfo.td b/llvm/lib/Target/Mips/MipsInstrInfo.td index 3403c9fcf78d..320c5b883483 100644 --- a/llvm/lib/Target/Mips/MipsInstrInfo.td +++ b/llvm/lib/Target/Mips/MipsInstrInfo.td @@ -96,12 +96,7 @@ def HI16 : SDNodeXFormgetValueType(0) == MVT::i32) - return (int32_t)N->getZExtValue() == (short)N->getZExtValue(); - else - return (int64_t)N->getZExtValue() == (short)N->getZExtValue(); -}]>; +def immSExt16 : PatLeaf<(imm), [{ return isInt<16>(N->getSExtValue()); }]>; // Node immediate fits as 16-bit zero extended on target immediate. // The LO16 param means that only the lower 16 bits of the node