13 #define DEBUG_TYPE "mips-isel"
32 cl::desc(
"Expand double precision loads and "
33 "stores to their single precision "
49 for (
unsigned VT0 = FirstVT; VT0 <= LastVT; ++VT0) {
50 for (
unsigned VT1 = FirstVT; VT1 <= LastVT; ++VT1)
264 case ISD::LOAD:
return lowerLOAD(Op, DAG);
307 if (MultLo.
getNode() != MultNode)
349 if (!
SDValue(ADDENode, 0).use_empty()) {
379 if (MultLo.
getNode() != MultNode)
421 if (!
SDValue(SUBENode, 0).use_empty()) {
470 int32_t Log2IfPositive = (Mask->
getAPIntValue() + 1).exactLogBase2();
472 if (Log2IfPositive <= 0)
476 EVT ExtendTy = cast<VTSDNode>(Op0Op2)->getVT();
478 unsigned Log2 = Log2IfPositive;
481 Log2 == ExtendTySize) {
507 APInt SplatValue, SplatUndef;
508 unsigned SplatBitSize;
511 if (!Node->
isConstantSplat(SplatValue, SplatUndef, SplatBitSize, HasAnyUndefs,
532 APInt SplatValue, SplatUndef;
533 unsigned SplatBitSize;
538 if (BVN->
isConstantSplat(SplatValue, SplatUndef, SplatBitSize, HasAnyUndefs))
583 bool IsLittleEndian = !Subtarget->
isLittle();
586 bool IsConstantMask =
false;
593 if (
isVSplat(Op0Op0, Mask, IsLittleEndian)) {
597 if (
isVSplat(Op1Op0, InvMask, IsLittleEndian) &&
600 else if (
isVSplat(Op1Op1, InvMask, IsLittleEndian) &&
604 IsConstantMask =
true;
614 if (
isVSplat(Op1Op0, InvMask, IsLittleEndian) &&
617 else if (
isVSplat(Op1Op1, InvMask, IsLittleEndian) &&
621 IsConstantMask =
true;
670 if (IsConstantMask) {
716 uint64_t Floor = 1LL <<
Log2_64(C);
717 uint64_t Ceil = Log2Ceil == 64 ? 0LL : 1LL << Log2Ceil;
722 if (C - Floor <= Ceil - C) {
752 APInt SplatValue, SplatUndef;
753 unsigned SplatBitSize;
762 !BV->
isConstantSplat(SplatValue, SplatUndef, SplatBitSize, HasAnyUndefs,
764 (SplatBitSize != EltSize) ||
800 if (Subtarget->
hasMSA()) {
819 EVT ExtendTy = cast<VTSDNode>(Op0Op0->
getOperand(2))->getVT();
822 if (TotalBits == 32 ||
866 default:
return false;
919 if (Op1 == Op0Op0 && Op2 == Op0Op1)
922 else if (Op1 == Op0Op1 && Op2 == Op0Op0)
1001 DEBUG(
dbgs() <<
"\nMipsSE DAG Combine:\n";
1003 dbgs() <<
"\n=> \n";
1018 case Mips::BPOSGE32_PSEUDO:
1019 return emitBPOSGE32(MI, BB);
1020 case Mips::SNZ_B_PSEUDO:
1021 return emitMSACBranchPseudo(MI, BB, Mips::BNZ_B);
1022 case Mips::SNZ_H_PSEUDO:
1023 return emitMSACBranchPseudo(MI, BB, Mips::BNZ_H);
1024 case Mips::SNZ_W_PSEUDO:
1025 return emitMSACBranchPseudo(MI, BB, Mips::BNZ_W);
1026 case Mips::SNZ_D_PSEUDO:
1027 return emitMSACBranchPseudo(MI, BB, Mips::BNZ_D);
1028 case Mips::SNZ_V_PSEUDO:
1029 return emitMSACBranchPseudo(MI, BB, Mips::BNZ_V);
1030 case Mips::SZ_B_PSEUDO:
1031 return emitMSACBranchPseudo(MI, BB, Mips::BZ_B);
1032 case Mips::SZ_H_PSEUDO:
1033 return emitMSACBranchPseudo(MI, BB, Mips::BZ_H);
1034 case Mips::SZ_W_PSEUDO:
1035 return emitMSACBranchPseudo(MI, BB, Mips::BZ_W);
1036 case Mips::SZ_D_PSEUDO:
1037 return emitMSACBranchPseudo(MI, BB, Mips::BZ_D);
1038 case Mips::SZ_V_PSEUDO:
1039 return emitMSACBranchPseudo(MI, BB, Mips::BZ_V);
1040 case Mips::COPY_FW_PSEUDO:
1041 return emitCOPY_FW(MI, BB);
1042 case Mips::COPY_FD_PSEUDO:
1043 return emitCOPY_FD(MI, BB);
1044 case Mips::INSERT_FW_PSEUDO:
1045 return emitINSERT_FW(MI, BB);
1046 case Mips::INSERT_FD_PSEUDO:
1047 return emitINSERT_FD(MI, BB);
1048 case Mips::FILL_FW_PSEUDO:
1049 return emitFILL_FW(MI, BB);
1050 case Mips::FILL_FD_PSEUDO:
1051 return emitFILL_FD(MI, BB);
1052 case Mips::FEXP2_W_1_PSEUDO:
1053 return emitFEXP2_W_1(MI, BB);
1054 case Mips::FEXP2_D_1_PSEUDO:
1055 return emitFEXP2_D_1(MI, BB);
1059 bool MipsSETargetLowering::
1060 isEligibleForTailCallOptimization(
const MipsCC &MipsCCInfo,
1061 unsigned NextStackOffset,
1075 void MipsSETargetLowering::
1077 std::deque< std::pair<unsigned, SDValue> > &RegsToPass,
1078 bool IsPICCall,
bool GlobalOrExternal,
bool InternalLinkage,
1082 if (IsPICCall || !GlobalOrExternal) {
1083 unsigned T9Reg =
IsN64 ? Mips::T9_64 : Mips::T9;
1084 RegsToPass.push_front(std::make_pair(T9Reg, Callee));
1089 InternalLinkage, CLI, Callee, Chain);
1154 SDValue MipsSETargetLowering::lowerMulDiv(
SDValue Op,
unsigned NewOpc,
1155 bool HasLo,
bool HasHi,
1168 if (!HasLo || !HasHi)
1169 return HasLo ? Lo :
Hi;
1218 if (Opnd.getValueType() ==
MVT::i64)
1266 EVT ViaVecTy = ResVecTy;
1281 SDValue Ops[16] = { LaneA, LaneB, LaneA, LaneB, LaneA, LaneB, LaneA, LaneB,
1282 LaneA, LaneB, LaneA, LaneB, LaneA, LaneB, LaneA, LaneB };
1287 if (ViaVecTy != ResVecTy)
1299 EVT ViaVecTy = VecTy;
1300 SDValue SplatValueA = SplatValue;
1301 SDValue SplatValueB = SplatValue;
1302 SDLoc DL(SplatValue);
1319 SDValue Ops[16] = { SplatValueA, SplatValueB, SplatValueA, SplatValueB,
1320 SplatValueA, SplatValueB, SplatValueA, SplatValueB,
1321 SplatValueA, SplatValueB, SplatValueA, SplatValueB,
1322 SplatValueA, SplatValueB, SplatValueA, SplatValueB };
1327 if (VecTy != ViaVecTy)
1344 APInt BitImm =
APInt(64, 1) << CImm->getAPIntValue();
1355 BitImmHiOp, BitImmLoOp, BitImmHiOp));
1359 if (Exp2Imm.
getNode() == NULL) {
1383 DAG.
getNOT(DL, Bit, ResTy));
1390 << cast<ConstantSDNode>(Op->
getOperand(2))->getAPIntValue();
1396 SDValue MipsSETargetLowering::lowerINTRINSIC_WO_CHAIN(
SDValue Op,
1400 switch (cast<ConstantSDNode>(Op->
getOperand(0))->getZExtValue()) {
2037 unsigned Intr = cast<ConstantSDNode>(Op->
getOperand(1))->getZExtValue();
2105 unsigned Intr = cast<ConstantSDNode>(Op->
getOperand(1))->getZExtValue();
2123 assert(nOps > 1 &&
"isSplatVector has 0 or 1 sized build vector");
2127 for (
unsigned int i = 1; i < nOps; ++i) {
2142 SDValue MipsSETargetLowering::
2165 if (dyn_cast<ConstantSDNode>(Op))
2167 if (dyn_cast<ConstantFPSDNode>(Op))
2197 APInt SplatValue, SplatUndef;
2198 unsigned SplatBitSize;
2208 if (SplatBitSize != 8 && SplatBitSize != 16 && SplatBitSize != 32 &&
2216 if (ResTy.isInteger() && !HasAnyUndefs && SplatValue.
isSignedIntN(10))
2221 switch (SplatBitSize) {
2242 if (ViaVecTy != ResTy)
2258 for (
unsigned i = 0; i < NumElts; ++i) {
2290 int SHFIndices[4] = { -1, -1, -1, -1 };
2292 if (Indices.
size() < 4)
2295 for (
unsigned i = 0; i < 4; ++i) {
2296 for (
unsigned j = i; j < Indices.
size(); j += 4) {
2297 int Idx = Indices[j];
2303 if (Idx < 0 || Idx >= 4)
2309 if (SHFIndices[i] == -1)
2310 SHFIndices[i] = Idx;
2314 if (!(Idx == -1 || Idx == SHFIndices[i]))
2321 for (
int i = 3; i >= 0; --i) {
2322 int Idx = SHFIndices[i];
2348 assert ((Indices.
size() % 2) == 0);
2352 for (
unsigned i = 0; i < Indices.
size(); i += 2) {
2353 if (Indices[i] != -1 && Indices[i] != WsIdx)
2355 if (Indices[i+1] != -1 && Indices[i+1] != WtIdx)
2378 assert ((Indices.
size() % 2) == 0);
2382 for (
unsigned i = 0; i < Indices.
size(); i += 2) {
2383 if (Indices[i] != -1 && Indices[i] != WsIdx)
2385 if (Indices[i+1] != -1 && Indices[i+1] != WtIdx)
2408 assert ((Indices.
size() % 2) == 0);
2412 for (
unsigned i = 0; i < Indices.
size(); i += 2) {
2413 if (Indices[i] != -1 && Indices[i] != WsIdx)
2415 if (Indices[i+1] != -1 && Indices[i+1] != WtIdx)
2438 assert ((Indices.
size() % 2) == 0);
2440 int WsIdx = NumElts / 2;
2441 int WtIdx = NumElts + NumElts / 2;
2443 for (
unsigned i = 0; i < Indices.
size(); i += 2) {
2444 if (Indices[i] != -1 && Indices[i] != WsIdx)
2446 if (Indices[i+1] != -1 && Indices[i+1] != WtIdx)
2469 assert ((Indices.
size() % 2) == 0);
2472 for (
unsigned i = 0; i < Indices.
size(); ++i) {
2473 if (Indices[i] != -1 && Indices[i] != Idx)
2495 assert ((Indices.
size() % 2) == 0);
2498 for (
unsigned i = 0; i < Indices.
size(); ++i) {
2499 if (Indices[i] != -1 && Indices[i] != Idx)
2524 bool Using1stVec =
false;
2525 bool Using2ndVec =
false;
2529 for (
int i = 0; i < ResTyNumElts; ++i) {
2531 int Idx = Indices[i];
2533 if (0 <= Idx && Idx < ResTyNumElts)
2535 if (ResTyNumElts <= Idx && Idx < ResTyNumElts * 2)
2546 if (Using1stVec && Using2ndVec) {
2549 }
else if (Using1stVec)
2551 else if (Using2ndVec)
2554 llvm_unreachable(
"shuffle vector mask references neither vector operand?");
2566 if (!ResTy.is128BitVector())
2569 int ResTyNumElts = ResTy.getVectorNumElements();
2572 for (
int i = 0; i < ResTyNumElts; ++i)
2640 BuildMI(BB, DL, TII->
get(Mips::BPOSGE32)).addMBB(TBB);
2645 .addReg(Mips::ZERO).
addImm(0);
2646 BuildMI(*FBB, FBB->
end(), DL, TII->
get(Mips::B)).addMBB(Sink);
2651 .addReg(Mips::ZERO).
addImm(1);
2664 unsigned BranchOp)
const{
2712 .addReg(Mips::ZERO).
addImm(0);
2713 BuildMI(*FBB, FBB->
end(), DL, TII->
get(Mips::B)).addMBB(Sink);
2718 .addReg(Mips::ZERO).
addImm(1);
2817 BuildMI(*BB, MI, DL, TII->
get(Mips::INSVE_W), Wd)
2850 BuildMI(*BB, MI, DL, TII->
get(Mips::INSVE_D), Wd)
2936 BuildMI(*BB, MI, DL, TII->
get(Mips::LDI_W), Ws1).addImm(1);
2937 BuildMI(*BB, MI, DL, TII->
get(Mips::FFINT_U_W), Ws2).addReg(Ws1);
2965 BuildMI(*BB, MI, DL, TII->
get(Mips::LDI_D), Ws1).addImm(1);
2966 BuildMI(*BB, MI, DL, TII->
get(Mips::FFINT_U_D), Ws2).addReg(Ws1);
value_iterator value_begin() const
unsigned getIncomingArgSize() const
void push_back(const T &Elt)
const MachineFunction * getParent() const
SDValue getConstant(uint64_t Val, EVT VT, bool isTarget=false)
SDValue getValue(unsigned R) const
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const
LowerOperation - Provide custom lowering hooks for some operations.
virtual void getOpndList(SmallVectorImpl< SDValue > &Ops, std::deque< std::pair< unsigned, SDValue > > &RegsToPass, bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage, CallLoweringInfo &CLI, SDValue Callee, SDValue Chain) const
static SDValue genConstMult(SDValue X, uint64_t C, SDLoc DL, EVT VT, EVT ShiftTy, SelectionDAG &DAG)
uint64_t getZExtValue() const
Get zero extended value.
static SDValue performORCombine(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI, const MipsSubtarget *Subtarget)
static SDValue performVSELECTCombine(SDNode *N, SelectionDAG &DAG)
const TargetMachine & getTargetMachine() const
SDVTList getVTList() const
unsigned createVirtualRegister(const TargetRegisterClass *RegClass)
static SDValue performDSPShiftCombine(unsigned Opc, SDNode *N, EVT Ty, SelectionDAG &DAG, const MipsSubtarget *Subtarget)
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
static APInt getLowBitsSet(unsigned numBits, unsigned loBitsSet)
Get a value with low bits set.
MipsSETargetLowering(MipsTargetMachine &TM)
unsigned getOpcode() const
unsigned getNumOperands() const
void transferSuccessorsAndUpdatePHIs(MachineBasicBlock *fromMBB)
const SDValue & getOperand(unsigned Num) const
const SDValue & getBasePtr() const
unsigned getResNo() const
get the index which selects a specific result in the SDNode
static SDValue performXORCombine(SDNode *N, SelectionDAG &DAG, const MipsSubtarget *Subtarget)
void setTruncStoreAction(MVT ValVT, MVT MemVT, LegalizeAction Action)
SDValue getLoad(EVT VT, SDLoc dl, SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo, bool isVolatile, bool isNonTemporal, bool isInvariant, unsigned Alignment, const MDNode *TBAAInfo=0, const MDNode *Ranges=0)
bool isVector() const
isVector - Return true if this is a vector value type.
virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *MBB) const
SDValue getStore(SDValue Chain, SDLoc dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, bool isVolatile, bool isNonTemporal, unsigned Alignment, const MDNode *TBAAInfo=0)
SDNode * MorphNodeTo(SDNode *N, unsigned Opc, SDVTList VTs, const SDValue *Ops, unsigned NumOps)
const HexagonInstrInfo * TII
#define llvm_unreachable(msg)
EVT getValueType(unsigned ResNo) const
static cl::opt< bool > EnableMipsTailCalls("enable-mips-tail-calls", cl::Hidden, cl::desc("MIPS: Enable tail calls."), cl::init(false))
APInt LLVM_ATTRIBUTE_UNUSED_RESULT lshr(unsigned shiftAmt) const
Logical right-shift function.
void setCondCodeAction(ISD::CondCode CC, MVT VT, LegalizeAction Action)
static SDValue lowerMSABitClearImm(SDValue Op, SelectionDAG &DAG)
static bool isConstantOrUndefBUILD_VECTOR(const BuildVectorSDNode *Op)
static SDValue performSRLCombine(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI, const MipsSubtarget *Subtarget)
void setOperationAction(unsigned Op, MVT VT, LegalizeAction Action)
int getMaskElt(unsigned Idx) const
const MachineInstrBuilder & addImm(int64_t Val) const
bool isInteger() const
isInteger - Return true if this is an integer, or a vector integer type.
static SDValue performSHLCombine(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI, const MipsSubtarget *Subtarget)
static SDValue lowerVECTOR_SHUFFLE_VSHF(SDValue Op, EVT ResTy, SmallVector< int, 16 > Indices, SelectionDAG &DAG)
EVT getVectorElementType() const
static bool isVSplat(SDValue N, APInt &Imm, bool IsLittleEndian)
size_t array_lengthof(T(&)[N])
Find the length of an array.
value_iterator value_end() const
Simple integer binary arithmetic operators.
static bool isConstantOrUndef(const SDValue Op)
const SDValue & getBasePtr() const
SDValue getUNDEF(EVT VT)
getUNDEF - Return an UNDEF node. UNDEF does not have a useful SDLoc.
const APInt & getAPIntValue() const
EVT getMemoryVT() const
getMemoryVT - Return the type of the in-memory value.
static SDValue lowerVECTOR_SHUFFLE_ILVR(SDValue Op, EVT ResTy, SmallVector< int, 16 > Indices, SelectionDAG &DAG)
const BasicBlock * getBasicBlock() const
UNDEF - An undefined node.
virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *MBB) const
static APInt getHighBitsSet(unsigned numBits, unsigned hiBitsSet)
Get a value with high bits set.
bool isConstantSplat(APInt &SplatValue, APInt &SplatUndef, unsigned &SplatBitSize, bool &HasAnyUndefs, unsigned MinSplatBits=0, bool isBigEndian=false)
SDNode * getNode() const
get the SDNode which holds the desired result
bundle_iterator< MachineInstr, instr_iterator > iterator
initializer< Ty > init(const Ty &Val)
MachineBasicBlock * CreateMachineBasicBlock(const BasicBlock *bb=0)
static SDValue lowerVECTOR_SHUFFLE_ILVEV(SDValue Op, EVT ResTy, SmallVector< int, 16 > Indices, SelectionDAG &DAG)
APInt LLVM_ATTRIBUTE_UNUSED_RESULT trunc(unsigned width) const
Truncate to new width.
static SDValue lowerDSPIntr(SDValue Op, SelectionDAG &DAG, unsigned Opc)
LLVM Basic Block Representation.
static SDValue getBuildVectorSplat(EVT VecTy, SDValue SplatValue, bool BigEndian, SelectionDAG &DAG)
const SDValue & getOperand(unsigned i) const
void addRegisterClass(MVT VT, const TargetRegisterClass *RC)
Simple binary floating point operators.
void setTargetDAGCombine(ISD::NodeType NT)
bool isNonTemporal() const
static bool isLegalDSPCondCode(EVT Ty, ISD::CondCode CC)
const MachineOperand & getOperand(unsigned i) const
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const
LowerOperation - Provide custom lowering hooks for some operations.
static bool isVectorAllOnes(SDValue N)
static SDValue lowerVECTOR_SHUFFLE_PCKEV(SDValue Op, EVT ResTy, SmallVector< int, 16 > Indices, SelectionDAG &DAG)
virtual MVT getScalarShiftAmountTy(EVT LHSTy) const
bool mipsSEUsesSoftFloat() const
ItTy next(ItTy it, Dist n)
static SDValue lowerMSALoadIntr(SDValue Op, SelectionDAG &DAG, unsigned Intr)
bool isBeforeLegalize() const
unsigned getBitWidth() const
Return the number of bits in the APInt.
unsigned getOpcode() const
const MipsSubtarget * Subtarget
const SDValue & getValue() const
MachineInstrBuilder BuildMI(MachineFunction &MF, DebugLoc DL, const MCInstrDesc &MCID)
uint64_t getConstantOperandVal(unsigned Num) const
const MCInstrDesc & get(unsigned Opcode) const
static bool selectMADD(SDNode *ADDENode, SelectionDAG *CurDAG)
const MipsTargetLowering * createMipsSETargetLowering(MipsTargetMachine &TM)
virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const
void setLoadExtAction(unsigned ExtType, MVT VT, LegalizeAction Action)
void printrWithDepth(raw_ostream &O, const SelectionDAG *G=0, unsigned depth=100) const
virtual const TargetInstrInfo * getInstrInfo() const
bool isBuildVectorAllOnes(const SDNode *N)
Node predicates.
SDValue getNOT(SDLoc DL, SDValue Val, EVT VT)
getNOT - Create a bitwise NOT operation as (XOR Val, -1).
static SDValue performMULCombine(SDNode *N, SelectionDAG &DAG, const TargetLowering::DAGCombinerInfo &DCI, const MipsSETargetLowering *TL)
SDValue lowerSTORE(SDValue Op, SelectionDAG &DAG) const
static SDValue lowerMSABitClear(SDValue Op, SelectionDAG &DAG)
const SDValue & getChain() const
static SDValue lowerMSASplatImm(SDValue Op, unsigned ImmOp, SelectionDAG &DAG)
static SDValue lowerMSACopyIntr(SDValue Op, SelectionDAG &DAG, unsigned Opc)
unsigned Log2_64_Ceil(uint64_t Value)
raw_ostream & dbgs()
dbgs - Return a circular-buffered debug stream.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
static SDValue performSETCCCombine(SDNode *N, SelectionDAG &DAG)
const MDNode * getTBAAInfo() const
Returns the TBAAInfo that describes the dereference.
Class for arbitrary precision integers.
void computeRegisterProperties()
static bool isSplatVector(const BuildVectorSDNode *N)
Check if the given BuildVectorSDNode is a splat. This method currently relies on DAG nodes being reus...
bool isSignedIntN(unsigned N) const
Check if this APInt has an N-bits signed integer value.
ZERO_EXTEND - Used for integer types, zeroing the new bits.
bool isPowerOf2_64(uint64_t Value)
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT)
static SDValue lowerVECTOR_SHUFFLE_ILVOD(SDValue Op, EVT ResTy, SmallVector< int, 16 > Indices, SelectionDAG &DAG)
static SDValue lowerMSASplatZExt(SDValue Op, unsigned OpNr, SelectionDAG &DAG)
static bool isBitwiseInverse(SDValue N, SDValue OfNode)
static SDValue performSUBECombine(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI, const MipsSubtarget *Subtarget)
static SDValue lowerMSAStoreIntr(SDValue Op, SelectionDAG &DAG, unsigned Intr)
static DebugLoc get(unsigned Line, unsigned Col, MDNode *Scope, MDNode *InlinedAt=0)
bool isAllOnesValue() const
Determine if all bits are set.
static SDValue initAccumulator(SDValue In, SDLoc DL, SelectionDAG &DAG)
Bitwise operators - logical and, logical or, logical xor.
SDValue lowerLOAD(SDValue Op, SelectionDAG &DAG) const
void splice(iterator Where, MachineBasicBlock *Other, iterator From)
MachineRegisterInfo & getRegInfo()
bool isSingleFloat() const
IMPLICIT_DEF - This is the MachineInstr-level equivalent of undef.
unsigned getSizeInBits() const
getSizeInBits - Return the size of the specified value type in bits.
static SDValue lowerMSABinaryBitImmIntr(SDValue Op, SelectionDAG &DAG, unsigned Opc, SDValue Imm, bool BigEndian)
bool is128BitVector() const
is128BitVector - Return true if this is a 128-bit vector type.
unsigned getReg() const
getReg - Returns the register number.
void insert(iterator MBBI, MachineBasicBlock *MBB)
LLVM Value Representation.
static SDValue extractLOHI(SDValue Op, SDLoc DL, SelectionDAG &DAG)
const MachineInstrBuilder & addMBB(MachineBasicBlock *MBB, unsigned char TargetFlags=0) const
SDValue getValueType(EVT)
static SDValue performSRACombine(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI, const MipsSubtarget *Subtarget)
static SDValue lowerVECTOR_SHUFFLE_SHF(SDValue Op, EVT ResTy, SmallVector< int, 16 > Indices, SelectionDAG &DAG)
BasicBlockListType::iterator iterator
static SDValue lowerVECTOR_SHUFFLE_ILVL(SDValue Op, EVT ResTy, SmallVector< int, 16 > Indices, SelectionDAG &DAG)
void ReplaceAllUsesOfValueWith(SDValue From, SDValue To)
virtual bool allowsUnalignedMemoryAccesses(EVT VT, bool *Fast) const
Determine if the target supports unaligned memory accesses.
SDValue getMergeValues(const SDValue *Ops, unsigned NumOps, SDLoc dl)
getMergeValues - Create a MERGE_VALUES node from the given operands.
SDValue getTargetConstant(uint64_t Val, EVT VT)
SDValue getSetCC(SDLoc DL, EVT VT, SDValue LHS, SDValue RHS, ISD::CondCode Cond)
virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const
void addMSAIntType(MVT::SimpleValueType Ty, const TargetRegisterClass *RC)
Enable MSA support for the given integer type and Register class.
static bool selectMSUB(SDNode *SUBENode, SelectionDAG *CurDAG)
TRUNCATE - Completely drop the high bits.
unsigned getAlignment() const
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
void addSuccessor(MachineBasicBlock *succ, uint32_t weight=0)
static SDValue performADDECombine(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI, const MipsSubtarget *Subtarget)
static RegisterPass< NVPTXAllocaHoisting > X("alloca-hoisting","Hoisting alloca instructions in non-entry ""blocks to the entry block")
unsigned Log2_64(uint64_t Value)
EVT changeVectorElementTypeToInteger() const
static cl::opt< bool > NoDPLoadStore("mno-ldc1-sdc1", cl::init(false), cl::desc("Expand double precision loads and ""stores to their single precision ""counterparts"))
static SDValue lowerVECTOR_SHUFFLE_PCKOD(SDValue Op, EVT ResTy, SmallVector< int, 16 > Indices, SelectionDAG &DAG)
void addMSAFloatType(MVT::SimpleValueType Ty, const TargetRegisterClass *RC)
Enable MSA support for the given floating-point type and Register class.
DebugLoc getDebugLoc() const
static SDValue performANDCombine(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI, const MipsSubtarget *Subtarget)
uint64_t getZExtValue() const
unsigned getVectorNumElements() const