Lines Matching refs:MVT
113 unsigned fastEmit_i(MVT Ty, MVT RetTy, unsigned Opc, uint64_t Imm) override;
145 bool isTypeLegal(Type *Ty, MVT &VT);
146 bool isLoadTypeLegal(Type *Ty, MVT &VT);
156 bool PPCEmitLoad(MVT VT, unsigned &ResultReg, Address &Addr,
159 bool PPCEmitStore(MVT VT, unsigned SrcReg, Address &Addr);
161 void PPCSimplifyAddress(Address &Addr, MVT VT, bool &UseOffset,
163 bool PPCEmitIntExt(MVT SrcVT, unsigned SrcReg, MVT DestVT,
165 unsigned PPCMaterializeFP(const ConstantFP *CFP, MVT VT);
166 unsigned PPCMaterializeGV(const GlobalValue *GV, MVT VT);
167 unsigned PPCMaterializeInt(const ConstantInt *CI, MVT VT,
173 unsigned PPCMoveToIntReg(const Instruction *I, MVT VT,
175 unsigned PPCMoveToFPReg(MVT VT, unsigned SrcReg, bool IsSigned);
181 SmallVectorImpl<MVT> &ArgVTs,
187 bool finishCall(MVT RetVT, CallLoweringInfo &CLI, unsigned &NumBytes);
265 bool PPCFastISel::isTypeLegal(Type *Ty, MVT &VT) { in isTypeLegal()
269 if (Evt == MVT::Other || !Evt.isSimple()) return false; in isTypeLegal()
279 bool PPCFastISel::isLoadTypeLegal(Type *Ty, MVT &VT) { in isLoadTypeLegal()
284 if (VT == MVT::i8 || VT == MVT::i16 || VT == MVT::i32) { in isLoadTypeLegal()
418 void PPCFastISel::PPCSimplifyAddress(Address &Addr, MVT VT, bool &UseOffset, in PPCSimplifyAddress()
437 IntegerType *OffsetTy = ((VT == MVT::i32) ? Type::getInt32Ty(*Context) in PPCSimplifyAddress()
441 IndexReg = PPCMaterializeInt(Offset, MVT::i64); in PPCSimplifyAddress()
449 bool PPCFastISel::PPCEmitLoad(MVT VT, unsigned &ResultReg, Address &Addr, in PPCEmitLoad()
465 (VT == MVT::f64 ? &PPC::F8RCRegClass : in PPCEmitLoad()
466 (VT == MVT::f32 ? &PPC::F4RCRegClass : in PPCEmitLoad()
467 (VT == MVT::i64 ? &PPC::G8RC_and_G8RC_NOX0RegClass : in PPCEmitLoad()
475 case MVT::i8: in PPCEmitLoad()
478 case MVT::i16: in PPCEmitLoad()
483 case MVT::i32: in PPCEmitLoad()
490 case MVT::i64: in PPCEmitLoad()
496 case MVT::f32: in PPCEmitLoad()
499 case MVT::f64: in PPCEmitLoad()
583 MVT VT; in SelectLoad()
607 bool PPCFastISel::PPCEmitStore(MVT VT, unsigned SrcReg, Address &Addr) { in PPCEmitStore()
618 case MVT::i8: in PPCEmitStore()
621 case MVT::i16: in PPCEmitStore()
624 case MVT::i32: in PPCEmitStore()
628 case MVT::i64: in PPCEmitStore()
632 case MVT::f32: in PPCEmitStore()
635 case MVT::f64: in PPCEmitStore()
728 MVT VT; in SelectStore()
806 MVT SrcVT = SrcEVT.getSimpleVT(); in PPCEmitCmp()
808 if (SrcVT == MVT::i1 && PPCSubTarget->useCRBits()) in PPCEmitCmp()
821 if (SrcVT == MVT::i64 || SrcVT == MVT::i32 || SrcVT == MVT::i16 || in PPCEmitCmp()
822 SrcVT == MVT::i8 || SrcVT == MVT::i1) { in PPCEmitCmp()
834 case MVT::f32: in PPCEmitCmp()
837 case MVT::f64: in PPCEmitCmp()
840 case MVT::i1: in PPCEmitCmp()
841 case MVT::i8: in PPCEmitCmp()
842 case MVT::i16: in PPCEmitCmp()
845 case MVT::i32: in PPCEmitCmp()
851 case MVT::i64: in PPCEmitCmp()
872 if (!PPCEmitIntExt(SrcVT, SrcReg1, MVT::i32, ExtReg, IsZExt)) in PPCEmitCmp()
878 if (!PPCEmitIntExt(SrcVT, SrcReg2, MVT::i32, ExtReg, IsZExt)) in PPCEmitCmp()
900 if (SrcVT != MVT::f32 || DestVT != MVT::f64) in SelectFPExt()
918 if (SrcVT != MVT::f64 || DestVT != MVT::f32) in SelectFPTrunc()
941 unsigned PPCFastISel::PPCMoveToFPReg(MVT SrcVT, unsigned SrcReg, in PPCMoveToFPReg()
945 if (SrcVT == MVT::i32) { in PPCMoveToFPReg()
947 if (!PPCEmitIntExt(MVT::i32, SrcReg, MVT::i64, TmpReg, !IsSigned)) in PPCMoveToFPReg()
958 if (!PPCEmitStore(MVT::i64, SrcReg, Addr)) in PPCMoveToFPReg()
965 if (SrcVT == MVT::i32) { in PPCMoveToFPReg()
977 if (!PPCEmitLoad(MVT::f64, ResultReg, Addr, RC, !IsSigned, LoadOpc)) in PPCMoveToFPReg()
987 MVT DstVT; in SelectIToFP()
992 if (DstVT != MVT::f32 && DstVT != MVT::f64) in SelectIToFP()
1000 MVT SrcVT = SrcEVT.getSimpleVT(); in SelectIToFP()
1002 if (SrcVT != MVT::i8 && SrcVT != MVT::i16 && in SelectIToFP()
1003 SrcVT != MVT::i32 && SrcVT != MVT::i64) in SelectIToFP()
1020 if (DstVT == MVT::f32 && !PPCSubTarget->hasFPCVT()) in SelectIToFP()
1024 if (SrcVT == MVT::i8 || SrcVT == MVT::i16) { in SelectIToFP()
1026 if (!PPCEmitIntExt(SrcVT, SrcReg, MVT::i64, TmpReg, !IsSigned)) in SelectIToFP()
1028 SrcVT = MVT::i64; in SelectIToFP()
1042 if (DstVT == MVT::f32) in SelectIToFP()
1060 unsigned PPCFastISel::PPCMoveToIntReg(const Instruction *I, MVT VT, in PPCMoveToIntReg()
1071 if (!PPCEmitStore(MVT::f64, SrcReg, Addr)) in PPCMoveToIntReg()
1076 if (VT == MVT::i32) in PPCMoveToIntReg()
1096 MVT DstVT, SrcVT; in SelectFPToI()
1101 if (DstVT != MVT::i32 && DstVT != MVT::i64) in SelectFPToI()
1105 if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget->hasFPCVT()) in SelectFPToI()
1113 if (SrcVT != MVT::f32 && SrcVT != MVT::f64) in SelectFPToI()
1137 if (DstVT == MVT::i32) in SelectFPToI()
1165 if (DestVT != MVT::i16 && DestVT != MVT::i8) in SelectBinaryIntOp()
1267 SmallVectorImpl<MVT> &ArgVTs, in processCallArgs()
1285 MVT ArgVT = ArgVTs[VA.getValNo()]; in processCallArgs()
1289 if (ArgVT.isVector() || ArgVT.getSizeInBits() > 64 || ArgVT == MVT::i1 || in processCallArgs()
1324 MVT ArgVT = ArgVTs[VA.getValNo()]; in processCallArgs()
1333 MVT DestVT = VA.getLocVT(); in processCallArgs()
1335 (DestVT == MVT::i64) ? &PPC::G8RCRegClass : &PPC::GPRCRegClass; in processCallArgs()
1345 MVT DestVT = VA.getLocVT(); in processCallArgs()
1347 (DestVT == MVT::i64) ? &PPC::G8RCRegClass : &PPC::GPRCRegClass; in processCallArgs()
1364 if (ArgVT == MVT::f32 || ArgVT == MVT::f64) { in processCallArgs()
1381 bool PPCFastISel::finishCall(MVT RetVT, CallLoweringInfo &CLI, unsigned &NumBytes) { in finishCall()
1392 if (RetVT != MVT::isVoid) { in finishCall()
1400 MVT DestVT = VA.getValVT(); in finishCall()
1401 MVT CopyVT = DestVT; in finishCall()
1405 if (RetVT == MVT::i8 || RetVT == MVT::i16 || RetVT == MVT::i32) in finishCall()
1406 CopyVT = MVT::i64; in finishCall()
1420 } else if (CopyVT == MVT::f64) { in finishCall()
1429 } else if (RetVT == MVT::i8 || RetVT == MVT::i16 || RetVT == MVT::i32) { in finishCall()
1468 MVT RetVT; in fastLowerCall()
1470 RetVT = MVT::isVoid; in fastLowerCall()
1471 else if (!isTypeLegal(RetTy, RetVT) && RetVT != MVT::i16 && in fastLowerCall()
1472 RetVT != MVT::i8) in fastLowerCall()
1474 else if (RetVT == MVT::i1 && PPCSubTarget->useCRBits()) in fastLowerCall()
1479 if (RetVT != MVT::isVoid && RetVT != MVT::i8 && RetVT != MVT::i16 && in fastLowerCall()
1480 RetVT != MVT::i32 && RetVT != MVT::i64 && RetVT != MVT::f32 && in fastLowerCall()
1481 RetVT != MVT::f64) { in fastLowerCall()
1498 SmallVector<MVT, 8> ArgVTs; in fastLowerCall()
1516 MVT ArgVT; in fastLowerCall()
1517 if (!isTypeLegal(ArgTy, ArgVT) && ArgVT != MVT::i16 && ArgVT != MVT::i8) in fastLowerCall()
1621 PPCMaterializeInt(CI, MVT::i64, VA.getLocInfo() == CCValAssign::SExt); in SelectRet()
1645 MVT RVVT = RVEVT.getSimpleVT(); in SelectRet()
1646 MVT DestVT = VA.getLocVT(); in SelectRet()
1648 if (RVVT != DestVT && RVVT != MVT::i8 && in SelectRet()
1649 RVVT != MVT::i16 && RVVT != MVT::i32) in SelectRet()
1661 (DestVT == MVT::i64) ? &PPC::G8RCRegClass : &PPC::GPRCRegClass; in SelectRet()
1670 (DestVT == MVT::i64) ? &PPC::G8RCRegClass : &PPC::GPRCRegClass; in SelectRet()
1699 bool PPCFastISel::PPCEmitIntExt(MVT SrcVT, unsigned SrcReg, MVT DestVT, in PPCEmitIntExt()
1701 if (DestVT != MVT::i32 && DestVT != MVT::i64) in PPCEmitIntExt()
1703 if (SrcVT != MVT::i8 && SrcVT != MVT::i16 && SrcVT != MVT::i32) in PPCEmitIntExt()
1709 if (SrcVT == MVT::i8) in PPCEmitIntExt()
1710 Opc = (DestVT == MVT::i32) ? PPC::EXTSB : PPC::EXTSB8_32_64; in PPCEmitIntExt()
1711 else if (SrcVT == MVT::i16) in PPCEmitIntExt()
1712 Opc = (DestVT == MVT::i32) ? PPC::EXTSH : PPC::EXTSH8_32_64; in PPCEmitIntExt()
1714 assert(DestVT == MVT::i64 && "Signed extend from i32 to i32??"); in PPCEmitIntExt()
1721 } else if (DestVT == MVT::i32) { in PPCEmitIntExt()
1723 if (SrcVT == MVT::i8) in PPCEmitIntExt()
1726 assert(SrcVT == MVT::i16 && "Unsigned extend from i32 to i32??"); in PPCEmitIntExt()
1736 if (SrcVT == MVT::i8) in PPCEmitIntExt()
1738 else if (SrcVT == MVT::i16) in PPCEmitIntExt()
1773 if (SrcVT != MVT::i64 && SrcVT != MVT::i32 && SrcVT != MVT::i16) in SelectTrunc()
1776 if (DestVT != MVT::i32 && DestVT != MVT::i16 && DestVT != MVT::i8) in SelectTrunc()
1784 if (SrcVT == MVT::i64) { in SelectTrunc()
1814 MVT SrcVT = SrcEVT.getSimpleVT(); in SelectIntExt()
1815 MVT DestVT = DestEVT.getSimpleVT(); in SelectIntExt()
1824 (DestVT == MVT::i64 ? &PPC::G8RC_and_G8RC_NOX0RegClass : in SelectIntExt()
1886 unsigned PPCFastISel::PPCMaterializeFP(const ConstantFP *CFP, MVT VT) { in PPCMaterializeFP()
1888 if (VT != MVT::f32 && VT != MVT::f64) in PPCMaterializeFP()
1900 MachineMemOperand::MOLoad, (VT == MVT::f32) ? 4 : 8, Align); in PPCMaterializeFP()
1902 unsigned Opc = (VT == MVT::f32) ? PPC::LFS : PPC::LFD; in PPCMaterializeFP()
1937 unsigned PPCFastISel::PPCMaterializeGV(const GlobalValue *GV, MVT VT) { in PPCMaterializeGV()
1938 assert(VT == MVT::i64 && "Non-address!"); in PPCMaterializeGV()
2080 unsigned PPCFastISel::PPCMaterializeInt(const ConstantInt *CI, MVT VT, in PPCMaterializeInt()
2084 if (VT == MVT::i1 && PPCSubTarget->useCRBits()) { in PPCMaterializeInt()
2091 if (VT != MVT::i64 && VT != MVT::i32 && VT != MVT::i16 && in PPCMaterializeInt()
2092 VT != MVT::i8 && VT != MVT::i1) in PPCMaterializeInt()
2095 const TargetRegisterClass *RC = ((VT == MVT::i64) ? &PPC::G8RCRegClass : in PPCMaterializeInt()
2100 unsigned Opc = (VT == MVT::i64) ? PPC::LI8 : PPC::LI; in PPCMaterializeInt()
2106 unsigned Opc = (VT == MVT::i64) ? PPC::LI8 : PPC::LI; in PPCMaterializeInt()
2116 if (VT == MVT::i64) in PPCMaterializeInt()
2118 else if (VT == MVT::i32) in PPCMaterializeInt()
2131 MVT VT = CEVT.getSimpleVT(); in fastMaterializeConstant()
2138 return PPCMaterializeInt(CI, VT, VT != MVT::i1); in fastMaterializeConstant()
2149 MVT VT; in fastMaterializeAlloca()
2176 MVT VT; in tryToFoldLoadIntoMI()
2190 if ((VT == MVT::i8 && MB <= 56) || in tryToFoldLoadIntoMI()
2191 (VT == MVT::i16 && MB <= 48) || in tryToFoldLoadIntoMI()
2192 (VT == MVT::i32 && MB <= 32)) in tryToFoldLoadIntoMI()
2201 if ((VT == MVT::i8 && MB <= 24) || in tryToFoldLoadIntoMI()
2202 (VT == MVT::i16 && MB <= 16)) in tryToFoldLoadIntoMI()
2216 if (VT != MVT::i16 && VT != MVT::i8) in tryToFoldLoadIntoMI()
2223 if (VT != MVT::i32 && VT != MVT::i16 && VT != MVT::i8) in tryToFoldLoadIntoMI()
2255 unsigned PPCFastISel::fastEmit_i(MVT Ty, MVT VT, unsigned Opc, uint64_t Imm) { in fastEmit_i()
2262 if (VT == MVT::i1 && PPCSubTarget->useCRBits()) { in fastEmit_i()
2269 if (VT != MVT::i64 && VT != MVT::i32 && VT != MVT::i16 && in fastEmit_i()
2270 VT != MVT::i8 && VT != MVT::i1) in fastEmit_i()
2273 const TargetRegisterClass *RC = ((VT == MVT::i64) ? &PPC::G8RCRegClass : in fastEmit_i()
2275 if (VT == MVT::i64) in fastEmit_i()