Lines Matching refs:MVT

182   bool isTypeLegal(Type *Ty, MVT &VT);
183 bool isTypeSupported(Type *Ty, MVT &VT, bool IsVectorAllowed = false);
187 bool simplifyAddress(Address &Addr, MVT VT);
196 bool optimizeIntExtLoad(const Instruction *I, MVT RetVT, MVT SrcVT);
201 unsigned emitAddSub(bool UseAdd, MVT RetVT, const Value *LHS,
204 unsigned emitAddSub_rr(bool UseAdd, MVT RetVT, unsigned LHSReg,
207 unsigned emitAddSub_ri(bool UseAdd, MVT RetVT, unsigned LHSReg,
210 unsigned emitAddSub_rs(bool UseAdd, MVT RetVT, unsigned LHSReg,
214 unsigned emitAddSub_rx(bool UseAdd, MVT RetVT, unsigned LHSReg,
222 bool emitICmp(MVT RetVT, const Value *LHS, const Value *RHS, bool IsZExt);
223 bool emitICmp_ri(MVT RetVT, unsigned LHSReg, uint64_t Imm);
224 bool emitFCmp(MVT RetVT, const Value *LHS, const Value *RHS);
225 unsigned emitLoad(MVT VT, MVT ResultVT, Address Addr, bool WantZExt = true,
227 bool emitStore(MVT VT, unsigned SrcReg, Address Addr,
229 bool emitStoreRelease(MVT VT, unsigned SrcReg, unsigned AddrReg,
231 unsigned emitIntExt(MVT SrcVT, unsigned SrcReg, MVT DestVT, bool isZExt);
232 unsigned emiti1Ext(unsigned SrcReg, MVT DestVT, bool isZExt);
233 unsigned emitAdd(MVT RetVT, const Value *LHS, const Value *RHS,
236 unsigned emitAdd_ri_(MVT VT, unsigned Op0, int64_t Imm);
237 unsigned emitSub(MVT RetVT, const Value *LHS, const Value *RHS,
240 unsigned emitSubs_rr(MVT RetVT, unsigned LHSReg, unsigned RHSReg,
242 unsigned emitSubs_rs(MVT RetVT, unsigned LHSReg, unsigned RHSReg,
245 unsigned emitLogicalOp(unsigned ISDOpc, MVT RetVT, const Value *LHS,
247 unsigned emitLogicalOp_ri(unsigned ISDOpc, MVT RetVT, unsigned LHSReg,
249 unsigned emitLogicalOp_rs(unsigned ISDOpc, MVT RetVT, unsigned LHSReg,
251 unsigned emitAnd_ri(MVT RetVT, unsigned LHSReg, uint64_t Imm);
252 unsigned emitMul_rr(MVT RetVT, unsigned Op0, unsigned Op1);
253 unsigned emitSMULL_rr(MVT RetVT, unsigned Op0, unsigned Op1);
254 unsigned emitUMULL_rr(MVT RetVT, unsigned Op0, unsigned Op1);
255 unsigned emitLSL_rr(MVT RetVT, unsigned Op0Reg, unsigned Op1Reg);
256 unsigned emitLSL_ri(MVT RetVT, MVT SrcVT, unsigned Op0Reg, uint64_t Imm,
258 unsigned emitLSR_rr(MVT RetVT, unsigned Op0Reg, unsigned Op1Reg);
259 unsigned emitLSR_ri(MVT RetVT, MVT SrcVT, unsigned Op0Reg, uint64_t Imm,
261 unsigned emitASR_rr(MVT RetVT, unsigned Op0Reg, unsigned Op1Reg);
262 unsigned emitASR_ri(MVT RetVT, MVT SrcVT, unsigned Op0Reg, uint64_t Imm,
265 unsigned materializeInt(const ConstantInt *CI, MVT VT);
266 unsigned materializeFP(const ConstantFP *CFP, MVT VT);
272 bool processCallArgs(CallLoweringInfo &CLI, SmallVectorImpl<MVT> &ArgVTs,
274 bool finishCall(CallLoweringInfo &CLI, MVT RetVT, unsigned NumBytes);
318 static unsigned getImplicitScaleFactor(MVT VT) { in getImplicitScaleFactor()
322 case MVT::i1: // fall-through in getImplicitScaleFactor()
323 case MVT::i8: in getImplicitScaleFactor()
325 case MVT::i16: in getImplicitScaleFactor()
327 case MVT::i32: // fall-through in getImplicitScaleFactor()
328 case MVT::f32: in getImplicitScaleFactor()
330 case MVT::i64: // fall-through in getImplicitScaleFactor()
331 case MVT::f64: in getImplicitScaleFactor()
347 assert(TLI.getValueType(DL, AI->getType(), true) == MVT::i64 && in fastMaterializeAlloca()
370 unsigned AArch64FastISel::materializeInt(const ConstantInt *CI, MVT VT) { in materializeInt()
371 if (VT > MVT::i64) in materializeInt()
378 const TargetRegisterClass *RC = (VT == MVT::i64) ? &AArch64::GPR64RegClass in materializeInt()
380 unsigned ZeroReg = (VT == MVT::i64) ? AArch64::XZR : AArch64::WZR; in materializeInt()
387 unsigned AArch64FastISel::materializeFP(const ConstantFP *CFP, MVT VT) { in materializeFP()
393 if (VT != MVT::f32 && VT != MVT::f64) in materializeFP()
397 bool Is64Bit = (VT == MVT::f64); in materializeFP()
516 MVT VT = CEVT.getSimpleVT(); in fastMaterializeConstant()
520 assert(VT == MVT::i64 && "Expected 64-bit pointers"); in fastMaterializeConstant()
537 MVT VT; in fastMaterializeFloatZero()
541 if (VT != MVT::f32 && VT != MVT::f64) in fastMaterializeFloatZero()
544 bool Is64Bit = (VT == MVT::f64); in fastMaterializeFloatZero()
757 Reg = fastEmitInst_extractsubreg(MVT::i32, Reg, AArch64::sub_32); in computeAddress()
853 Reg = fastEmitInst_extractsubreg(MVT::i32, Reg, AArch64::sub_32); in computeAddress()
958 bool AArch64FastISel::isTypeLegal(Type *Ty, MVT &VT) { in isTypeLegal()
965 if (evt == MVT::Other || !evt.isSimple()) in isTypeLegal()
970 if (VT == MVT::f128) in isTypeLegal()
982 bool AArch64FastISel::isTypeSupported(Type *Ty, MVT &VT, bool IsVectorAllowed) { in isTypeSupported()
991 if (VT == MVT::i1 || VT == MVT::i8 || VT == MVT::i16) in isTypeSupported()
1005 bool AArch64FastISel::simplifyAddress(Address &Addr, MVT VT) { in simplifyAddress()
1052 ResultReg = emitAddSub_rx(/*UseAdd=*/true, MVT::i64, Addr.getReg(), in simplifyAddress()
1056 ResultReg = emitAddSub_rs(/*UseAdd=*/true, MVT::i64, Addr.getReg(), in simplifyAddress()
1061 ResultReg = emitLSL_ri(MVT::i64, MVT::i32, Addr.getOffsetReg(), in simplifyAddress()
1064 ResultReg = emitLSL_ri(MVT::i64, MVT::i32, Addr.getOffsetReg(), in simplifyAddress()
1067 ResultReg = emitLSL_ri(MVT::i64, MVT::i64, Addr.getOffsetReg(), in simplifyAddress()
1085 ResultReg = emitAdd_ri_(MVT::i64, Addr.getReg(), Offset); in simplifyAddress()
1087 ResultReg = fastEmit_i(MVT::i64, MVT::i64, ISD::Constant, Offset); in simplifyAddress()
1137 unsigned AArch64FastISel::emitAddSub(bool UseAdd, MVT RetVT, const Value *LHS, in emitAddSub()
1145 case MVT::i1: in emitAddSub()
1148 case MVT::i8: in emitAddSub()
1152 case MVT::i16: in emitAddSub()
1156 case MVT::i32: // fall-through in emitAddSub()
1157 case MVT::i64: in emitAddSub()
1160 MVT SrcVT = RetVT; in emitAddSub()
1161 RetVT.SimpleTy = std::max(RetVT.SimpleTy, MVT::i32); in emitAddSub()
1280 unsigned AArch64FastISel::emitAddSub_rr(bool UseAdd, MVT RetVT, unsigned LHSReg, in emitAddSub_rr()
1289 if (RetVT != MVT::i32 && RetVT != MVT::i64) in emitAddSub_rr()
1298 bool Is64Bit = RetVT == MVT::i64; in emitAddSub_rr()
1317 unsigned AArch64FastISel::emitAddSub_ri(bool UseAdd, MVT RetVT, unsigned LHSReg, in emitAddSub_ri()
1322 if (RetVT != MVT::i32 && RetVT != MVT::i64) in emitAddSub_ri()
1340 bool Is64Bit = RetVT == MVT::i64; in emitAddSub_ri()
1362 unsigned AArch64FastISel::emitAddSub_rs(bool UseAdd, MVT RetVT, unsigned LHSReg, in emitAddSub_rs()
1371 if (RetVT != MVT::i32 && RetVT != MVT::i64) in emitAddSub_rs()
1384 bool Is64Bit = RetVT == MVT::i64; in emitAddSub_rs()
1404 unsigned AArch64FastISel::emitAddSub_rx(bool UseAdd, MVT RetVT, unsigned LHSReg, in emitAddSub_rx()
1413 if (RetVT != MVT::i32 && RetVT != MVT::i64) in emitAddSub_rx()
1425 bool Is64Bit = RetVT == MVT::i64; in emitAddSub_rx()
1453 MVT VT = EVT.getSimpleVT(); in emitCmp()
1458 case MVT::i1: in emitCmp()
1459 case MVT::i8: in emitCmp()
1460 case MVT::i16: in emitCmp()
1461 case MVT::i32: in emitCmp()
1462 case MVT::i64: in emitCmp()
1464 case MVT::f32: in emitCmp()
1465 case MVT::f64: in emitCmp()
1470 bool AArch64FastISel::emitICmp(MVT RetVT, const Value *LHS, const Value *RHS, in emitICmp()
1476 bool AArch64FastISel::emitICmp_ri(MVT RetVT, unsigned LHSReg, uint64_t Imm) { in emitICmp_ri()
1481 bool AArch64FastISel::emitFCmp(MVT RetVT, const Value *LHS, const Value *RHS) { in emitFCmp()
1482 if (RetVT != MVT::f32 && RetVT != MVT::f64) in emitFCmp()
1497 unsigned Opc = (RetVT == MVT::f64) ? AArch64::FCMPDri : AArch64::FCMPSri; in emitFCmp()
1507 unsigned Opc = (RetVT == MVT::f64) ? AArch64::FCMPDrr : AArch64::FCMPSrr; in emitFCmp()
1514 unsigned AArch64FastISel::emitAdd(MVT RetVT, const Value *LHS, const Value *RHS, in emitAdd()
1525 unsigned AArch64FastISel::emitAdd_ri_(MVT VT, unsigned Op0, int64_t Imm) { in emitAdd_ri_()
1543 unsigned AArch64FastISel::emitSub(MVT RetVT, const Value *LHS, const Value *RHS, in emitSub()
1549 unsigned AArch64FastISel::emitSubs_rr(MVT RetVT, unsigned LHSReg, in emitSubs_rr()
1555 unsigned AArch64FastISel::emitSubs_rs(MVT RetVT, unsigned LHSReg, in emitSubs_rs()
1563 unsigned AArch64FastISel::emitLogicalOp(unsigned ISDOpc, MVT RetVT, in emitLogicalOp()
1632 MVT VT = std::max(MVT::i32, RetVT.SimpleTy); in emitLogicalOp()
1634 if (RetVT >= MVT::i8 && RetVT <= MVT::i16) { in emitLogicalOp()
1635 uint64_t Mask = (RetVT == MVT::i8) ? 0xff : 0xffff; in emitLogicalOp()
1636 ResultReg = emitAnd_ri(MVT::i32, ResultReg, Mask); in emitLogicalOp()
1641 unsigned AArch64FastISel::emitLogicalOp_ri(unsigned ISDOpc, MVT RetVT, in emitLogicalOp_ri()
1656 case MVT::i1: in emitLogicalOp_ri()
1657 case MVT::i8: in emitLogicalOp_ri()
1658 case MVT::i16: in emitLogicalOp_ri()
1659 case MVT::i32: { in emitLogicalOp_ri()
1666 case MVT::i64: in emitLogicalOp_ri()
1679 if (RetVT >= MVT::i8 && RetVT <= MVT::i16 && ISDOpc != ISD::AND) { in emitLogicalOp_ri()
1680 uint64_t Mask = (RetVT == MVT::i8) ? 0xff : 0xffff; in emitLogicalOp_ri()
1681 ResultReg = emitAnd_ri(MVT::i32, ResultReg, Mask); in emitLogicalOp_ri()
1686 unsigned AArch64FastISel::emitLogicalOp_rs(unsigned ISDOpc, MVT RetVT, in emitLogicalOp_rs()
1706 case MVT::i1: in emitLogicalOp_rs()
1707 case MVT::i8: in emitLogicalOp_rs()
1708 case MVT::i16: in emitLogicalOp_rs()
1709 case MVT::i32: in emitLogicalOp_rs()
1713 case MVT::i64: in emitLogicalOp_rs()
1721 if (RetVT >= MVT::i8 && RetVT <= MVT::i16) { in emitLogicalOp_rs()
1722 uint64_t Mask = (RetVT == MVT::i8) ? 0xff : 0xffff; in emitLogicalOp_rs()
1723 ResultReg = emitAnd_ri(MVT::i32, ResultReg, Mask); in emitLogicalOp_rs()
1728 unsigned AArch64FastISel::emitAnd_ri(MVT RetVT, unsigned LHSReg, in emitAnd_ri()
1733 unsigned AArch64FastISel::emitLoad(MVT VT, MVT RetVT, Address Addr, in emitLoad()
1809 bool IsRet64Bit = RetVT == MVT::i64; in emitLoad()
1813 case MVT::i1: // Intentional fall-through. in emitLoad()
1814 case MVT::i8: in emitLoad()
1819 case MVT::i16: in emitLoad()
1824 case MVT::i32: in emitLoad()
1829 case MVT::i64: in emitLoad()
1833 case MVT::f32: in emitLoad()
1837 case MVT::f64: in emitLoad()
1850 if (VT == MVT::i1) { in emitLoad()
1851 unsigned ANDReg = emitAnd_ri(MVT::i32, ResultReg, 1); in emitLoad()
1858 if (WantZExt && RetVT == MVT::i64 && VT <= MVT::i32) { in emitLoad()
1871 MVT VT; in selectAddSub()
1897 MVT VT; in selectLogicalOp()
1926 MVT VT; in selectLoad()
1956 MVT RetVT = VT; in selectLoad()
1997 if (RetVT == MVT::i64 && VT <= MVT::i32) { in selectLoad()
2004 ResultReg = fastEmitInst_extractsubreg(MVT::i32, ResultReg, in selectLoad()
2036 bool AArch64FastISel::emitStoreRelease(MVT VT, unsigned SrcReg, in emitStoreRelease()
2042 case MVT::i8: Opc = AArch64::STLRB; break; in emitStoreRelease()
2043 case MVT::i16: Opc = AArch64::STLRH; break; in emitStoreRelease()
2044 case MVT::i32: Opc = AArch64::STLRW; break; in emitStoreRelease()
2045 case MVT::i64: Opc = AArch64::STLRX; break; in emitStoreRelease()
2058 bool AArch64FastISel::emitStore(MVT VT, unsigned SrcReg, Address Addr, in emitStore()
2101 case MVT::i1: VTIsi1 = true; LLVM_FALLTHROUGH; in emitStore()
2102 case MVT::i8: Opc = OpcTable[Idx][0]; break; in emitStore()
2103 case MVT::i16: Opc = OpcTable[Idx][1]; break; in emitStore()
2104 case MVT::i32: Opc = OpcTable[Idx][2]; break; in emitStore()
2105 case MVT::i64: Opc = OpcTable[Idx][3]; break; in emitStore()
2106 case MVT::f32: Opc = OpcTable[Idx][4]; break; in emitStore()
2107 case MVT::f64: Opc = OpcTable[Idx][5]; break; in emitStore()
2112 unsigned ANDReg = emitAnd_ri(MVT::i32, SrcReg, 1); in emitStore()
2127 MVT VT; in selectStore()
2155 SrcReg = (VT == MVT::i64) ? AArch64::XZR : AArch64::WZR; in selectStore()
2158 VT = MVT::getIntegerVT(VT.getSizeInBits()); in selectStore()
2159 SrcReg = (VT == MVT::i64) ? AArch64::XZR : AArch64::WZR; in selectStore()
2255 MVT VT; in emitCompareAndBranch()
2301 if (VT == MVT::i1) in emitCompareAndBranch()
2347 SrcReg = fastEmitInst_extractsubreg(MVT::i32, SrcReg, AArch64::sub_32); in emitCompareAndBranch()
2350 SrcReg = emitIntExt(VT, SrcReg, MVT::i32, /*isZExt=*/true); in emitCompareAndBranch()
2532 ResultReg = fastEmit_i(MVT::i32, MVT::i32, ISD::Constant, 1); in selectCmp()
2642 Src1Reg = emitLogicalOp_ri(ISD::XOR, MVT::i32, Src1Reg, 1); in optimizeSelect()
2652 MVT VT; in selectSelect()
2661 case MVT::i1: in selectSelect()
2662 case MVT::i8: in selectSelect()
2663 case MVT::i16: in selectSelect()
2664 case MVT::i32: in selectSelect()
2668 case MVT::i64: in selectSelect()
2672 case MVT::f32: in selectSelect()
2676 case MVT::f64: in selectSelect()
2804 MVT DestVT; in selectFPToInt()
2813 if (SrcVT == MVT::f128 || SrcVT == MVT::f16) in selectFPToInt()
2817 if (SrcVT == MVT::f64) { in selectFPToInt()
2819 Opc = (DestVT == MVT::i32) ? AArch64::FCVTZSUWDr : AArch64::FCVTZSUXDr; in selectFPToInt()
2821 Opc = (DestVT == MVT::i32) ? AArch64::FCVTZUUWDr : AArch64::FCVTZUUXDr; in selectFPToInt()
2824 Opc = (DestVT == MVT::i32) ? AArch64::FCVTZSUWSr : AArch64::FCVTZSUXSr; in selectFPToInt()
2826 Opc = (DestVT == MVT::i32) ? AArch64::FCVTZUUWSr : AArch64::FCVTZUUXSr; in selectFPToInt()
2829 DestVT == MVT::i32 ? &AArch64::GPR32RegClass : &AArch64::GPR64RegClass); in selectFPToInt()
2837 MVT DestVT; in selectIntToFP()
2841 if (DestVT == MVT::f16) in selectIntToFP()
2844 assert((DestVT == MVT::f32 || DestVT == MVT::f64) && in selectIntToFP()
2854 if (SrcVT == MVT::i16 || SrcVT == MVT::i8 || SrcVT == MVT::i1) { in selectIntToFP()
2856 emitIntExt(SrcVT.getSimpleVT(), SrcReg, MVT::i32, /*isZExt*/ !Signed); in selectIntToFP()
2862 if (SrcVT == MVT::i64) { in selectIntToFP()
2864 Opc = (DestVT == MVT::f32) ? AArch64::SCVTFUXSri : AArch64::SCVTFUXDri; in selectIntToFP()
2866 Opc = (DestVT == MVT::f32) ? AArch64::UCVTFUXSri : AArch64::UCVTFUXDri; in selectIntToFP()
2869 Opc = (DestVT == MVT::f32) ? AArch64::SCVTFUWSri : AArch64::SCVTFUWDri; in selectIntToFP()
2871 Opc = (DestVT == MVT::f32) ? AArch64::UCVTFUWSri : AArch64::UCVTFUWDri; in selectIntToFP()
2915 MVT VT = ArgVT.getSimpleVT().SimpleTy; in fastLowerArguments()
2923 if (VT >= MVT::i1 && VT <= MVT::i64) in fastLowerArguments()
2925 else if ((VT >= MVT::f16 && VT <= MVT::f64) || VT.is64BitVector() || in fastLowerArguments()
2953 MVT VT = TLI.getSimpleValueType(DL, Arg.getType()); in fastLowerArguments()
2956 if (VT >= MVT::i1 && VT <= MVT::i32) { in fastLowerArguments()
2959 VT = MVT::i32; in fastLowerArguments()
2960 } else if (VT == MVT::i64) { in fastLowerArguments()
2963 } else if (VT == MVT::f16) { in fastLowerArguments()
2966 } else if (VT == MVT::f32) { in fastLowerArguments()
2969 } else if ((VT == MVT::f64) || VT.is64BitVector()) { in fastLowerArguments()
2992 SmallVectorImpl<MVT> &OutVTs, in processCallArgs()
3010 MVT ArgVT = OutVTs[VA.getValNo()]; in processCallArgs()
3021 MVT DestVT = VA.getLocVT(); in processCallArgs()
3022 MVT SrcVT = ArgVT; in processCallArgs()
3031 MVT DestVT = VA.getLocVT(); in processCallArgs()
3032 MVT SrcVT = ArgVT; in processCallArgs()
3081 bool AArch64FastISel::finishCall(CallLoweringInfo &CLI, MVT RetVT, in finishCall()
3091 if (RetVT != MVT::isVoid) { in finishCall()
3101 MVT CopyVT = RVLocs[0].getValVT(); in finishCall()
3153 MVT RetVT; in fastLowerCall()
3155 RetVT = MVT::isVoid; in fastLowerCall()
3165 SmallVector<MVT, 16> OutVTs; in fastLowerCall()
3169 MVT VT; in fastLowerCall()
3171 !(VT == MVT::i1 || VT == MVT::i8 || VT == MVT::i16)) in fastLowerCall()
3275 MVT VT; in tryEmitSmallMemCpy()
3278 VT = MVT::i64; in tryEmitSmallMemCpy()
3280 VT = MVT::i32; in tryEmitSmallMemCpy()
3282 VT = MVT::i16; in tryEmitSmallMemCpy()
3284 VT = MVT::i8; in tryEmitSmallMemCpy()
3289 VT = MVT::i32; in tryEmitSmallMemCpy()
3291 VT = MVT::i16; in tryEmitSmallMemCpy()
3293 VT = MVT::i8; in tryEmitSmallMemCpy()
3329 MVT RetVT; in foldXALUIntrinsic()
3336 if (RetVT != MVT::i32 && RetVT != MVT::i64) in foldXALUIntrinsic()
3507 MVT RetVT; in fastLowerIntrinsicCall()
3511 if (RetVT != MVT::f32 && RetVT != MVT::f64) in fastLowerIntrinsicCall()
3520 bool Is64Bit = RetVT == MVT::f64; in fastLowerIntrinsicCall()
3556 MVT VT; in fastLowerIntrinsicCall()
3564 case MVT::f32: in fastLowerIntrinsicCall()
3567 case MVT::f64: in fastLowerIntrinsicCall()
3592 MVT VT; in fastLowerIntrinsicCall()
3618 MVT VT; in fastLowerIntrinsicCall()
3622 if (VT != MVT::i32 && VT != MVT::i64) in fastLowerIntrinsicCall()
3682 if (VT == MVT::i32) { in fastLowerIntrinsicCall()
3683 MulReg = emitSMULL_rr(MVT::i64, LHSReg, RHSReg); in fastLowerIntrinsicCall()
3687 emitAddSub_rx(/*UseAdd=*/false, MVT::i64, MulReg, MulSubReg, in fastLowerIntrinsicCall()
3692 assert(VT == MVT::i64 && "Unexpected value type."); in fastLowerIntrinsicCall()
3712 if (VT == MVT::i32) { in fastLowerIntrinsicCall()
3713 MulReg = emitUMULL_rr(MVT::i64, LHSReg, RHSReg); in fastLowerIntrinsicCall()
3721 assert(VT == MVT::i64 && "Unexpected value type."); in fastLowerIntrinsicCall()
3821 MVT RVVT = RVEVT.getSimpleVT(); in selectRet()
3822 if (RVVT == MVT::f128) in selectRet()
3825 MVT DestVT = VA.getValVT(); in selectRet()
3828 if (RVVT != MVT::i1 && RVVT != MVT::i8 && RVVT != MVT::i16) in selectRet()
3843 SrcReg = emitAnd_ri(MVT::i64, SrcReg, 0xffffffff); in selectRet()
3872 MVT SrcVT = SrcEVT.getSimpleVT(); in selectTrunc()
3873 MVT DestVT = DestEVT.getSimpleVT(); in selectTrunc()
3875 if (SrcVT != MVT::i64 && SrcVT != MVT::i32 && SrcVT != MVT::i16 && in selectTrunc()
3876 SrcVT != MVT::i8) in selectTrunc()
3878 if (DestVT != MVT::i32 && DestVT != MVT::i16 && DestVT != MVT::i8 && in selectTrunc()
3879 DestVT != MVT::i1) in selectTrunc()
3892 if (SrcVT == MVT::i64) { in selectTrunc()
3898 case MVT::i1: in selectTrunc()
3901 case MVT::i8: in selectTrunc()
3904 case MVT::i16: in selectTrunc()
3909 unsigned Reg32 = fastEmitInst_extractsubreg(MVT::i32, SrcReg, in selectTrunc()
3912 ResultReg = emitAnd_ri(MVT::i32, Reg32, Mask); in selectTrunc()
3925 unsigned AArch64FastISel::emiti1Ext(unsigned SrcReg, MVT DestVT, bool IsZExt) { in emiti1Ext()
3926 assert((DestVT == MVT::i8 || DestVT == MVT::i16 || DestVT == MVT::i32 || in emiti1Ext()
3927 DestVT == MVT::i64) && in emiti1Ext()
3930 if (DestVT == MVT::i8 || DestVT == MVT::i16) in emiti1Ext()
3931 DestVT = MVT::i32; in emiti1Ext()
3934 unsigned ResultReg = emitAnd_ri(MVT::i32, SrcReg, 1); in emiti1Ext()
3936 if (DestVT == MVT::i64) { in emiti1Ext()
3949 if (DestVT == MVT::i64) { in emiti1Ext()
3958 unsigned AArch64FastISel::emitMul_rr(MVT RetVT, unsigned Op0, unsigned Op1) { in emitMul_rr()
3962 case MVT::i8: in emitMul_rr()
3963 case MVT::i16: in emitMul_rr()
3964 case MVT::i32: in emitMul_rr()
3965 RetVT = MVT::i32; in emitMul_rr()
3967 case MVT::i64: in emitMul_rr()
3972 (RetVT == MVT::i64) ? &AArch64::GPR64RegClass : &AArch64::GPR32RegClass; in emitMul_rr()
3976 unsigned AArch64FastISel::emitSMULL_rr(MVT RetVT, unsigned Op0, unsigned Op1) { in emitSMULL_rr()
3977 if (RetVT != MVT::i64) in emitSMULL_rr()
3984 unsigned AArch64FastISel::emitUMULL_rr(MVT RetVT, unsigned Op0, unsigned Op1) { in emitUMULL_rr()
3985 if (RetVT != MVT::i64) in emitUMULL_rr()
3992 unsigned AArch64FastISel::emitLSL_rr(MVT RetVT, unsigned Op0Reg, in emitLSL_rr()
3999 case MVT::i8: Opc = AArch64::LSLVWr; NeedTrunc = true; Mask = 0xff; break; in emitLSL_rr()
4000 case MVT::i16: Opc = AArch64::LSLVWr; NeedTrunc = true; Mask = 0xffff; break; in emitLSL_rr()
4001 case MVT::i32: Opc = AArch64::LSLVWr; break; in emitLSL_rr()
4002 case MVT::i64: Opc = AArch64::LSLVXr; break; in emitLSL_rr()
4006 (RetVT == MVT::i64) ? &AArch64::GPR64RegClass : &AArch64::GPR32RegClass; in emitLSL_rr()
4008 Op1Reg = emitAnd_ri(MVT::i32, Op1Reg, Mask); in emitLSL_rr()
4012 ResultReg = emitAnd_ri(MVT::i32, ResultReg, Mask); in emitLSL_rr()
4016 unsigned AArch64FastISel::emitLSL_ri(MVT RetVT, MVT SrcVT, unsigned Op0, in emitLSL_ri()
4020 assert((SrcVT == MVT::i1 || SrcVT == MVT::i8 || SrcVT == MVT::i16 || in emitLSL_ri()
4021 SrcVT == MVT::i32 || SrcVT == MVT::i64) && in emitLSL_ri()
4023 assert((RetVT == MVT::i8 || RetVT == MVT::i16 || RetVT == MVT::i32 || in emitLSL_ri()
4024 RetVT == MVT::i64) && "Unexpected return value type."); in emitLSL_ri()
4026 bool Is64Bit = (RetVT == MVT::i64); in emitLSL_ri()
4082 if (SrcVT.SimpleTy <= MVT::i32 && RetVT == MVT::i64) { in emitLSL_ri()
4094 unsigned AArch64FastISel::emitLSR_rr(MVT RetVT, unsigned Op0Reg, in emitLSR_rr()
4101 case MVT::i8: Opc = AArch64::LSRVWr; NeedTrunc = true; Mask = 0xff; break; in emitLSR_rr()
4102 case MVT::i16: Opc = AArch64::LSRVWr; NeedTrunc = true; Mask = 0xffff; break; in emitLSR_rr()
4103 case MVT::i32: Opc = AArch64::LSRVWr; break; in emitLSR_rr()
4104 case MVT::i64: Opc = AArch64::LSRVXr; break; in emitLSR_rr()
4108 (RetVT == MVT::i64) ? &AArch64::GPR64RegClass : &AArch64::GPR32RegClass; in emitLSR_rr()
4110 Op0Reg = emitAnd_ri(MVT::i32, Op0Reg, Mask); in emitLSR_rr()
4111 Op1Reg = emitAnd_ri(MVT::i32, Op1Reg, Mask); in emitLSR_rr()
4115 ResultReg = emitAnd_ri(MVT::i32, ResultReg, Mask); in emitLSR_rr()
4119 unsigned AArch64FastISel::emitLSR_ri(MVT RetVT, MVT SrcVT, unsigned Op0, in emitLSR_ri()
4123 assert((SrcVT == MVT::i1 || SrcVT == MVT::i8 || SrcVT == MVT::i16 || in emitLSR_ri()
4124 SrcVT == MVT::i32 || SrcVT == MVT::i64) && in emitLSR_ri()
4126 assert((RetVT == MVT::i8 || RetVT == MVT::i16 || RetVT == MVT::i32 || in emitLSR_ri()
4127 RetVT == MVT::i64) && "Unexpected return value type."); in emitLSR_ri()
4129 bool Is64Bit = (RetVT == MVT::i64); in emitLSR_ri()
4198 if (SrcVT.SimpleTy <= MVT::i32 && RetVT == MVT::i64) { in emitLSR_ri()
4210 unsigned AArch64FastISel::emitASR_rr(MVT RetVT, unsigned Op0Reg, in emitASR_rr()
4217 case MVT::i8: Opc = AArch64::ASRVWr; NeedTrunc = true; Mask = 0xff; break; in emitASR_rr()
4218 case MVT::i16: Opc = AArch64::ASRVWr; NeedTrunc = true; Mask = 0xffff; break; in emitASR_rr()
4219 case MVT::i32: Opc = AArch64::ASRVWr; break; in emitASR_rr()
4220 case MVT::i64: Opc = AArch64::ASRVXr; break; in emitASR_rr()
4224 (RetVT == MVT::i64) ? &AArch64::GPR64RegClass : &AArch64::GPR32RegClass; in emitASR_rr()
4226 Op0Reg = emitIntExt(RetVT, Op0Reg, MVT::i32, /*isZExt=*/false); in emitASR_rr()
4227 Op1Reg = emitAnd_ri(MVT::i32, Op1Reg, Mask); in emitASR_rr()
4231 ResultReg = emitAnd_ri(MVT::i32, ResultReg, Mask); in emitASR_rr()
4235 unsigned AArch64FastISel::emitASR_ri(MVT RetVT, MVT SrcVT, unsigned Op0, in emitASR_ri()
4239 assert((SrcVT == MVT::i1 || SrcVT == MVT::i8 || SrcVT == MVT::i16 || in emitASR_ri()
4240 SrcVT == MVT::i32 || SrcVT == MVT::i64) && in emitASR_ri()
4242 assert((RetVT == MVT::i8 || RetVT == MVT::i16 || RetVT == MVT::i32 || in emitASR_ri()
4243 RetVT == MVT::i64) && "Unexpected return value type."); in emitASR_ri()
4245 bool Is64Bit = (RetVT == MVT::i64); in emitASR_ri()
4303 if (SrcVT.SimpleTy <= MVT::i32 && RetVT == MVT::i64) { in emitASR_ri()
4315 unsigned AArch64FastISel::emitIntExt(MVT SrcVT, unsigned SrcReg, MVT DestVT, in emitIntExt()
4317 assert(DestVT != MVT::i1 && "ZeroExt/SignExt an i1?"); in emitIntExt()
4323 if (((DestVT != MVT::i8) && (DestVT != MVT::i16) && in emitIntExt()
4324 (DestVT != MVT::i32) && (DestVT != MVT::i64)) || in emitIntExt()
4325 ((SrcVT != MVT::i1) && (SrcVT != MVT::i8) && in emitIntExt()
4326 (SrcVT != MVT::i16) && (SrcVT != MVT::i32))) in emitIntExt()
4335 case MVT::i1: in emitIntExt()
4337 case MVT::i8: in emitIntExt()
4338 if (DestVT == MVT::i64) in emitIntExt()
4344 case MVT::i16: in emitIntExt()
4345 if (DestVT == MVT::i64) in emitIntExt()
4351 case MVT::i32: in emitIntExt()
4352 assert(DestVT == MVT::i64 && "IntExt i32 to i32?!?"); in emitIntExt()
4359 if (DestVT == MVT::i8 || DestVT == MVT::i16) in emitIntExt()
4360 DestVT = MVT::i32; in emitIntExt()
4361 else if (DestVT == MVT::i64) { in emitIntExt()
4372 (DestVT == MVT::i64) ? &AArch64::GPR64RegClass : &AArch64::GPR32RegClass; in emitIntExt()
4424 bool AArch64FastISel::optimizeIntExtLoad(const Instruction *I, MVT RetVT, in optimizeIntExtLoad()
4425 MVT SrcVT) { in optimizeIntExtLoad()
4453 if (RetVT != MVT::i64 || SrcVT > MVT::i32) { in optimizeIntExtLoad()
4481 MVT RetVT; in selectIntExt()
4482 MVT SrcVT; in selectIntExt()
4501 if (RetVT == MVT::i64 && SrcVT != MVT::i64) { in selectIntExt()
4529 MVT DestVT = DestEVT.getSimpleVT(); in selectRem()
4530 if (DestVT != MVT::i64 && DestVT != MVT::i32) in selectRem()
4534 bool Is64bit = (DestVT == MVT::i64); in selectRem()
4555 (DestVT == MVT::i64) ? &AArch64::GPR64RegClass : &AArch64::GPR32RegClass; in selectRem()
4566 MVT VT; in selectMul()
4583 MVT SrcVT = VT; in selectMul()
4587 MVT VT; in selectMul()
4596 MVT VT; in selectMul()
4636 MVT RetVT; in selectShift()
4646 MVT SrcVT = RetVT; in selectShift()
4651 MVT TmpVT; in selectShift()
4660 MVT TmpVT; in selectShift()
4722 MVT RetVT, SrcVT; in selectBitCast()
4730 if (RetVT == MVT::f32 && SrcVT == MVT::i32) in selectBitCast()
4732 else if (RetVT == MVT::f64 && SrcVT == MVT::i64) in selectBitCast()
4734 else if (RetVT == MVT::i32 && SrcVT == MVT::f32) in selectBitCast()
4736 else if (RetVT == MVT::i64 && SrcVT == MVT::f64) in selectBitCast()
4744 case MVT::i32: RC = &AArch64::GPR32RegClass; break; in selectBitCast()
4745 case MVT::i64: RC = &AArch64::GPR64RegClass; break; in selectBitCast()
4746 case MVT::f32: RC = &AArch64::FPR32RegClass; break; in selectBitCast()
4747 case MVT::f64: RC = &AArch64::FPR64RegClass; break; in selectBitCast()
4762 MVT RetVT; in selectFRem()
4770 case MVT::f32: in selectFRem()
4773 case MVT::f64: in selectFRem()
4800 MVT VT; in selectSDiv()
4808 if ((VT != MVT::i32 && VT != MVT::i64) || !C || in selectSDiv()
4836 if (VT == MVT::i64) { in selectSDiv()
4850 unsigned ZeroReg = (VT == MVT::i64) ? AArch64::XZR : AArch64::WZR; in selectSDiv()
4875 MVT PtrVT = TLI.getPointerTy(DL); in getRegForGEPIndex()
4899 MVT VT = TLI.getPointerTy(DL); in selectGetElementPtr()
4964 MVT VT; in selectAtomicCmpXchg()
4972 if (VT == MVT::i32) { in selectAtomicCmpXchg()
4976 } else if (VT == MVT::i64) { in selectAtomicCmpXchg()
5006 .addDef(VT == MVT::i32 ? AArch64::WZR : AArch64::XZR) in selectAtomicCmpXchg()