Home | History | Annotate | Download | only in Mips

Lines Matching refs:MVT

226   setLoadExtAction(ISD::EXTLOAD,  MVT::i1,  Promote);
227 setLoadExtAction(ISD::ZEXTLOAD, MVT::i1, Promote);
228 setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote);
231 setLoadExtAction(ISD::EXTLOAD, MVT::f32, Expand);
232 setTruncStoreAction(MVT::f64, MVT::f32, Expand);
238 AddPromotedToType(ISD::SETCC, MVT::i1, MVT::i32);
241 setOperationAction(ISD::BR_JT, MVT::Other, Custom);
242 setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
243 setOperationAction(ISD::BlockAddress, MVT::i32, Custom);
244 setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom);
245 setOperationAction(ISD::JumpTable, MVT::i32, Custom);
246 setOperationAction(ISD::ConstantPool, MVT::i32, Custom);
247 setOperationAction(ISD::SELECT, MVT::f32, Custom);
248 setOperationAction(ISD::SELECT, MVT::f64, Custom);
249 setOperationAction(ISD::SELECT, MVT::i32, Custom);
250 setOperationAction(ISD::SELECT_CC, MVT::f32, Custom);
251 setOperationAction(ISD::SELECT_CC, MVT::f64, Custom);
252 setOperationAction(ISD::SETCC, MVT::f32, Custom);
253 setOperationAction(ISD::SETCC, MVT::f64, Custom);
254 setOperationAction(ISD::BRCOND, MVT::Other, Custom);
255 setOperationAction(ISD::VASTART, MVT::Other, Custom);
256 setOperationAction(ISD::FCOPYSIGN, MVT::f32, Custom);
257 setOperationAction(ISD::FCOPYSIGN, MVT::f64, Custom);
258 setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom);
261 setOperationAction(ISD::FABS, MVT::f32, Custom);
262 setOperationAction(ISD::FABS, MVT::f64, Custom);
266 setOperationAction(ISD::GlobalAddress, MVT::i64, Custom);
267 setOperationAction(ISD::BlockAddress, MVT::i64, Custom);
268 setOperationAction(ISD::GlobalTLSAddress, MVT::i64, Custom);
269 setOperationAction(ISD::JumpTable, MVT::i64, Custom);
270 setOperationAction(ISD::ConstantPool, MVT::i64, Custom);
271 setOperationAction(ISD::SELECT, MVT::i64, Custom);
272 setOperationAction(ISD::LOAD, MVT::i64, Custom);
273 setOperationAction(ISD::STORE, MVT::i64, Custom);
274 setOperationAction(ISD::FP_TO_SINT, MVT::i64, Custom);
278 setOperationAction(ISD::SHL_PARTS, MVT::i32, Custom);
279 setOperationAction(ISD::SRA_PARTS, MVT::i32, Custom);
280 setOperationAction(ISD::SRL_PARTS, MVT::i32, Custom);
283 setOperationAction(ISD::ADD, MVT::i32, Custom);
285 setOperationAction(ISD::ADD, MVT::i64, Custom);
287 setOperationAction(ISD::SDIV, MVT::i32, Expand);
288 setOperationAction(ISD::SREM, MVT::i32, Expand);
289 setOperationAction(ISD::UDIV, MVT::i32, Expand);
290 setOperationAction(ISD::UREM, MVT::i32, Expand);
291 setOperationAction(ISD::SDIV, MVT::i64, Expand);
292 setOperationAction(ISD::SREM, MVT::i64, Expand);
293 setOperationAction(ISD::UDIV, MVT::i64, Expand);
294 setOperationAction(ISD::UREM, MVT::i64, Expand);
297 setOperationAction(ISD::BR_CC, MVT::f32, Expand);
298 setOperationAction(ISD::BR_CC, MVT::f64, Expand);
299 setOperationAction(ISD::BR_CC, MVT::i32, Expand);
300 setOperationAction(ISD::BR_CC, MVT::i64, Expand);
301 setOperationAction(ISD::SELECT_CC, MVT::Other, Expand);
302 setOperationAction(ISD::UINT_TO_FP, MVT::i32, Expand);
303 setOperationAction(ISD::UINT_TO_FP, MVT::i64, Expand);
304 setOperationAction(ISD::FP_TO_UINT, MVT::i32, Expand);
305 setOperationAction(ISD::FP_TO_UINT, MVT::i64, Expand);
306 setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1, Expand);
307 setOperationAction(ISD::CTPOP, MVT::i32, Expand);
308 setOperationAction(ISD::CTPOP, MVT::i64, Expand);
309 setOperationAction(ISD::CTTZ, MVT::i32, Expand);
310 setOperationAction(ISD::CTTZ, MVT::i64, Expand);
311 setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i32, Expand);
312 setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i64, Expand);
313 setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i32, Expand);
314 setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i64, Expand);
315 setOperationAction(ISD::ROTL, MVT::i32, Expand);
316 setOperationAction(ISD::ROTL, MVT::i64, Expand);
317 setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand);
318 setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i64, Expand);
321 setOperationAction(ISD::ROTR, MVT::i32, Expand);
324 setOperationAction(ISD::ROTR, MVT::i64, Expand);
326 setOperationAction(ISD::FSIN, MVT::f32, Expand);
327 setOperationAction(ISD::FSIN, MVT::f64, Expand);
328 setOperationAction(ISD::FCOS, MVT::f32, Expand);
329 setOperationAction(ISD::FCOS, MVT::f64, Expand);
330 setOperationAction(ISD::FSINCOS, MVT::f32, Expand);
331 setOperationAction(ISD::FSINCOS, MVT::f64, Expand);
332 setOperationAction(ISD::FPOWI, MVT::f32, Expand);
333 setOperationAction(ISD::FPOW, MVT::f32, Expand);
334 setOperationAction(ISD::FPOW, MVT::f64, Expand);
335 setOperationAction(ISD::FLOG, MVT::f32, Expand);
336 setOperationAction(ISD::FLOG2, MVT::f32, Expand);
337 setOperationAction(ISD::FLOG10, MVT::f32, Expand);
338 setOperationAction(ISD::FEXP, MVT::f32, Expand);
339 setOperationAction(ISD::FMA, MVT::f32, Expand);
340 setOperationAction(ISD::FMA, MVT
341 setOperationAction(ISD::FREM, MVT::f32, Expand);
342 setOperationAction(ISD::FREM, MVT::f64, Expand);
345 setOperationAction(ISD::FNEG, MVT::f32, Expand);
346 setOperationAction(ISD::FNEG, MVT::f64, Expand);
349 setOperationAction(ISD::EH_RETURN, MVT::Other, Custom);
351 setOperationAction(ISD::VAARG, MVT::Other, Expand);
352 setOperationAction(ISD::VACOPY, MVT::Other, Expand);
353 setOperationAction(ISD::VAEND, MVT::Other, Expand);
356 setOperationAction(ISD::STACKSAVE, MVT::Other, Expand);
357 setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand);
359 setOperationAction(ISD::ATOMIC_LOAD, MVT::i32, Expand);
360 setOperationAction(ISD::ATOMIC_LOAD, MVT::i64, Expand);
361 setOperationAction(ISD::ATOMIC_STORE, MVT::i32, Expand);
362 setOperationAction(ISD::ATOMIC_STORE, MVT::i64, Expand);
367 setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8, Expand);
368 setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16, Expand);
372 setOperationAction(ISD::CTLZ, MVT::i32, Expand);
373 setOperationAction(ISD::CTLZ, MVT::i64, Expand);
377 setOperationAction(ISD::BSWAP, MVT::i32, Expand);
378 setOperationAction(ISD::BSWAP, MVT::i64, Expand);
382 setLoadExtAction(ISD::SEXTLOAD, MVT::i32, Custom);
383 setLoadExtAction(ISD::ZEXTLOAD, MVT::i32, Custom);
384 setLoadExtAction(ISD::EXTLOAD, MVT::i32, Custom);
385 setTruncStoreAction(MVT::i64, MVT::i32, Custom);
388 setOperationAction(ISD::TRAP, MVT::Other, Legal);
416 return MVT::i32;
427 unsigned LO = (Ty == MVT::i32) ? Mips::LO : Mips::LO64;
428 unsigned HI = (Ty == MVT::i32) ? Mips::HI : Mips::HI64;
433 SDValue DivRem = DAG.getNode(Opc, DL, MVT::Glue,
515 return DAG.getNode(MipsISD::FPCmp, DL, MVT::Glue, LHS, RHS,
516 DAG.getConstant(condCodeToFCC(CC), MVT::i32));
524 SDValue FCC0 = DAG.getRegister(Mips::FCC0, MVT::i32);
599 ShiftRight.getOperand(0), DAG.getConstant(Pos, MVT::i32),
600 DAG.getConstant(SMSize, MVT::i32));
653 DAG.getConstant(SMPos0, MVT::i32),
654 DAG.getConstant(SMSize0, MVT::i32), And0.getOperand(0));
920 const TargetRegisterClass *RC = getRegClassFor(MVT::getIntegerVT(Size * 8));
1008 const TargetRegisterClass *RC = getRegClassFor(MVT::i32);
1167 const TargetRegisterClass *RC = getRegClassFor(MVT::getIntegerVT(Size * 8));
1250 const TargetRegisterClass *RC = getRegClassFor(MVT::i32);
1421 return DAG.getNode(ISD::BRIND, DL, MVT::Other, Chain, Addr);
1443 SDValue BrCode = DAG.getConstant(Opc, MVT::i32);
1444 SDValue FCC0 = DAG.getRegister(Mips::FCC0, MVT::i32);
1482 SDValue True = DAG.getConstant(1, MVT::i32);
1483 SDValue False = DAG.getConstant(0, MVT::i32);
1500 SDValue GA = DAG.getTargetGlobalAddress(GV, DL, MVT::i32, 0,
1503 DAG.getVTList(MVT::i32), &GA, 1);
1504 SDValue GPReg = DAG.getRegister(Mips::GP, MVT::i32);
1505 return DAG.getNode(ISD::ADD, DL, MVT::i32, GPReg, GPRelNode);
1630 // SDValue GPRelNode = DAG.getNode(MipsISD::GPRel, MVT::i32, CP);
1631 // SDValue GOT = DAG.getGLOBAL_OFFSET_TABLE(MVT::i32);
1632 // ResNode = DAG.getNode(ISD::ADD, MVT::i32, GOT, GPRelNode);
1658 SDValue Const1 = DAG.getConstant(1, MVT::i32);
1659 SDValue Const31 = DAG.getConstant(31, MVT::i32);
1665 SDValue X = (TyX == MVT::f32) ?
1666 DAG.getNode(ISD::BITCAST, DL, MVT::i32, Op.getOperand(0)) :
1667 DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Op.getOperand(0),
1669 SDValue Y = (TyY == MVT::f32) ?
1670 DAG.getNode(ISD::BITCAST, DL, MVT::i32, Op.getOperand(1)) :
1671 DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Op.getOperand(1),
1677 SDValue E = DAG.getNode(MipsISD::Ext, DL, MVT::i32, Y, Const31, Const1);
1678 Res = DAG.getNode(MipsISD::Ins, DL, MVT::i32, E, Const31, Const1, X);
1685 SDValue SllX = DAG.getNode(ISD::SHL, DL, MVT::i32, X, Const1);
1686 SDValue SrlX = DAG.getNode(ISD::SRL, DL, MVT::i32, SllX, Const1);
1687 SDValue SrlY = DAG.getNode(ISD::SRL, DL, MVT::i32, Y, Const31);
1688 SDValue SllY = DAG.getNode(ISD::SHL, DL, MVT::i32, SrlY, Const31);
1689 Res = DAG.getNode(ISD::OR, DL, MVT::i32, SrlX, SllY);
1692 if (TyX == MVT::f32)
1695 SDValue LowX = DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32,
1696 Op.getOperand(0), DAG.getConstant(0, MVT::i32));
1697 return DAG.getNode(MipsISD::BuildPairF64, DL, MVT::f64, LowX, Res);
1703 EVT TyX = MVT::getIntegerVT(WidthX), TyY = MVT::getIntegerVT(WidthY);
1704 SDValue Const1 = DAG.getConstant(1, MVT::i32);
1715 DAG.getConstant(WidthY - 1, MVT::i32), Const1);
1723 DAG.getConstant(WidthX - 1, MVT::i32), Const1, X);
1735 DAG.getConstant(WidthY - 1, MVT::i32));
1743 DAG.getConstant(WidthX - 1, MVT::i32));
1757 SDValue Res, Const1 = DAG.getConstant(1, MVT::i32);
1762 SDValue X = (Op.getValueType() == MVT::f32) ?
1763 DAG.getNode(ISD::BITCAST, DL, MVT::i32, Op.getOperand(0)) :
1764 DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Op.getOperand(0),
1769 Res = DAG.getNode(MipsISD::Ins, DL, MVT::i32,
1770 DAG.getRegister(Mips::ZERO, MVT::i32),
1771 DAG.getConstant(31, MVT::i32), Const1, X);
1773 SDValue SllX = DAG.getNode(ISD::SHL, DL, MVT::i32, X, Const1);
1774 Res = DAG.getNode(ISD::SRL, DL, MVT::i32, SllX, Const1);
1777 if (Op.getValueType() == MVT::f32)
1778 return DAG.getNode(ISD::BITCAST, DL, MVT::f32, Res);
1780 SDValue LowX = DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32,
1781 Op.getOperand(0), DAG.getConstant(0, MVT::i32));
1782 return DAG.getNode(MipsISD::BuildPairF64, DL, MVT::f64, LowX, Res);
1786 SDValue Res, Const1 = DAG.getConstant(1, MVT::i32);
1790 SDValue X = DAG.getNode(ISD::BITCAST, DL, MVT::i64, Op.getOperand(0));
1794 Res = DAG.getNode(MipsISD::Ins, DL, MVT::i64,
1795 DAG.getRegister(Mips::ZERO_64, MVT::i64),
1796 DAG.getConstant(63, MVT::i32), Const1, X);
1798 SDValue SllX = DAG.getNode(ISD::SHL, DL, MVT::i64, X, Const1);
1799 Res = DAG.getNode(ISD::SRL, DL, MVT::i64, SllX, Const1);
1802 return DAG.getNode(ISD::BITCAST, DL, MVT::f64, Res);
1807 if (Subtarget->hasMips64() && (Op.getValueType() == MVT::f64))
1836 MVT VT = Op.getSimpleValueType();
1859 EVT Ty = IsN64 ? MVT::i64 : MVT::i32;
1867 return DAG.getNode(MipsISD::EH_RETURN, DL, MVT::Other, Chain,
1879 return DAG.getNode(MipsISD::Sync, DL, MVT::Other, Op.getOperand(0),
1880 DAG.getConstant(SType, MVT::i32));
1895 SDValue Not = DAG.getNode(ISD::XOR, DL, MVT::i32, Shamt,
1896 DAG.getConstant(-1, MVT::i32));
1897 SDValue ShiftRight1Lo = DAG.getNode(ISD::SRL, DL, MVT::i32, Lo,
1898 DAG.getConstant(1, MVT::i32));
1899 SDValue ShiftRightLo = DAG.getNode(ISD::SRL, DL, MVT::i32, ShiftRight1Lo,
1901 SDValue ShiftLeftHi = DAG.getNode(ISD::SHL, DL, MVT::i32, Hi, Shamt);
1902 SDValue Or = DAG.getNode(ISD::OR, DL, MVT::i32, ShiftLeftHi, ShiftRightLo);
1903 SDValue ShiftLeftLo = DAG.getNode(ISD::SHL, DL, MVT::i32, Lo, Shamt);
1904 SDValue Cond = DAG.getNode(ISD::AND, DL, MVT::i32, Shamt,
1905 DAG.getConstant(0x20, MVT::i32));
1906 Lo = DAG.getNode(ISD::SELECT, DL, MVT::i32, Cond,
1907 DAG.getConstant(0, MVT::i32), ShiftLeftLo);
1908 Hi = DAG.getNode(ISD::SELECT, DL, MVT::i32, Cond, ShiftLeftLo, Or);
1933 SDValue Not = DAG.getNode(ISD::XOR, DL, MVT::i32, Shamt,
1934 DAG.getConstant(-1, MVT::i32));
1935 SDValue ShiftLeft1Hi = DAG.getNode(ISD::SHL, DL, MVT::i32, Hi,
1936 DAG.getConstant(1, MVT::i32));
1937 SDValue ShiftLeftHi = DAG.getNode(ISD::SHL, DL, MVT::i32, ShiftLeft1Hi, Not);
1938 SDValue ShiftRightLo = DAG.getNode(ISD::SRL, DL, MVT::i32, Lo, Shamt);
1939 SDValue Or = DAG.getNode(ISD::OR, DL, MVT::i32, ShiftLeftHi, ShiftRightLo);
1940 SDValue ShiftRightHi = DAG.getNode(IsSRA ? ISD::SRA : ISD::SRL, DL, MVT::i32,
1942 SDValue Cond = DAG.getNode(ISD::AND, DL, MVT::i32, Shamt,
1943 DAG.getConstant(0x20, MVT::i32));
1944 SDValue Shift31 = DAG.getNode(ISD::SRA, DL, MVT::i32, Hi,
1945 DAG.getConstant(31, MVT::i32));
1946 Lo = DAG.getNode(ISD::SELECT, DL, MVT::i32, Cond, ShiftRightHi, Or);
1947 Hi = DAG.getNode(ISD::SELECT, DL, MVT::i32, Cond,
1948 IsSRA ? Shift31 : DAG.getConstant(0, MVT::i32),
1961 SDVTList VTList = DAG.getVTList(VT, MVT::Other);
1979 ((MemVT != MVT::i32) && (MemVT != MVT::i64)))
1987 assert((VT == MVT::i32) || (VT == MVT::i64));
1994 if ((VT == MVT::i64) && (ExtType == ISD::NON_EXTLOAD)) {
2013 if ((VT == MVT::i32) || (ExtType == ISD::SEXTLOAD) ||
2017 assert((VT == MVT::i64) && (ExtType == ISD::ZEXTLOAD));
2027 SDValue Const32 = DAG.getConstant(32, MVT::i32);
2028 SDValue SLL = DAG.getNode(ISD::SHL, DL, MVT::i64, LWR, Const32);
2029 SDValue SRL = DAG.getNode(ISD::SRL, DL, MVT::i64, SLL, Const32);
2039 SDVTList VTList = DAG.getVTList(MVT::Other);
2062 if ((VT == MVT::i32) || SD->isTruncatingStore()) {
2068 assert(VT == MVT::i64);
2101 ((MemVT == MVT::i32) || (MemVT == MVT::i64)))
2155 static bool CC_MipsO32(unsigned ValNo, MVT ValVT,
2156 MVT LocVT, CCValAssign::LocInfo LocInfo,
2176 if (LocVT == MVT::i8 || LocVT == MVT::i16) {
2177 LocVT = MVT::i32;
2194 bool isI64 = (ValVT == MVT::i32 && OrigAlign == 8);
2196 if (ValVT == MVT::i32 || (ValVT == MVT::f32 && AllocateFloatsInIntReg)) {
2202 LocVT = MVT::i32;
2203 } else if (ValVT == MVT::f64 && AllocateFloatsInIntReg) {
2210 LocVT = MVT::i32;
2213 if (ValVT == MVT::f32) {
2282 EVT Ty = IsN64 ? MVT::i64 : MVT::i32;
2391 MVT ValVT = VA.getValVT(), LocVT = VA.getLocVT();
2412 if ((ValVT == MVT::f32 && LocVT == MVT::i32) ||
2413 (ValVT == MVT::f64 && LocVT == MVT::i64) ||
2414 (ValVT == MVT::i64 && LocVT == MVT::f64))
2416 else if (ValVT == MVT::f64 && LocVT == MVT::i32) {
2417 SDValue Lo = DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32,
2418 Arg, DAG.getConstant(0, MVT::i32));
2419 SDValue Hi = DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32,
2420 Arg, DAG.getConstant(1, MVT::i32));
2461 Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other,
2501 SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
2507 return DAG.getNode(MipsISD::TailCall, DL, MVT::Other, &Ops[0], Ops.size());
2620 if (RegVT == MVT::i32)
2623 else if (RegVT == MVT::i64)
2625 else if (RegVT == MVT::f32)
2627 else if (RegVT == MVT::f64)
2654 if ((RegVT == MVT::i32 && ValVT == MVT::f32) ||
2655 (RegVT == MVT::i64 && ValVT == MVT::f64) ||
2656 (RegVT == MVT::f64 && ValVT == MVT::i64))
2658 else if (IsO32 && RegVT == MVT::i32 && ValVT == MVT::f64) {
2664 ArgValue = DAG.getNode(MipsISD::BuildPairF64, DL, MVT::f64,
2693 createVirtualRegister(getRegClassFor(IsN64 ? MVT::i64 : MVT::i32));
2697 Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Copy, Chain);
2707 Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other,
2793 return DAG.getNode(MipsISD::Ret, DL, MVT::Other, &RetOps[0], RetOps.size());
2887 getRegForInlineAsmConstraint(const std::string &Constraint, MVT VT) const
2894 if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8) {
2899 if (VT == MVT::i64 && !HasMips64)
2901 if (VT == MVT::i64 && HasMips64)
2906 if (VT == MVT::f32)
2908 if ((VT == MVT::f64) && (!Subtarget->isSingleFloat())) {
2915 if (VT == MVT::i32)
2917 assert(VT == MVT::i64 && "Unexpected type.");
2920 if (VT == MVT::i32)
3059 return MVT::i64;
3061 return MVT::i32;
3065 if (VT != MVT::f32 && VT != MVT::f64)
3156 MVT ArgVT = Args[I].VT;
3168 MVT RegVT = getRegVT(ArgVT, FuncArgs[Args[I].OrigArgIndex].Ty, CallNode,
3191 MVT ArgVT = Args[I].VT;
3201 MVT RegVT = getRegVT(ArgVT, FuncArg->getType(), 0, IsSoftFloat);
3226 MVT VT = RetVals[I].VT;
3228 MVT RegVT = this->getRegVT(VT, RetTy, CallNode, IsSoftFloat);
3253 MipsTargetLowering::MipsCC::handleByValArg(unsigned ValNo, MVT ValVT,
3254 MVT LocVT,
3328 MVT MipsTargetLowering::MipsCC::getRegVT(MVT VT, const Type *OrigTy,
3336 assert(VT == MVT::i64);
3337 return MVT::f64;
3370 MVT RegTy = MVT::getIntegerVT(CC.regSize() * 8);
3398 EVT PtrTy = getPointerTy(), RegTy = MVT::getIntegerVT(RegSize * 8);
3439 MachinePointerInfo(), MVT::getIntegerVT(LoadSize * 8),
3452 DAG.getConstant(Shamt, MVT::i32));
3492 MVT RegTy = MVT::getIntegerVT(RegSize * 8);