Lines Matching refs:HVC
199 AlignVectors(const HexagonVectorCombine &HVC_) : HVC(HVC_) {} in AlignVectors()
209 AddrInfo(const HexagonVectorCombine &HVC, Instruction *I, Value *A, Type *T, in AddrInfo()
212 NeedAlign(HVC.getTypeAlignment(ValTy)) {} in AddrInfo()
364 const HexagonVectorCombine &HVC; member in __anoncba317990111::AlignVectors
422 HvxIdioms(const HexagonVectorCombine &HVC_) : HVC(HVC_) { in HvxIdioms()
423 auto *Int32Ty = HVC.getIntTy(32); in HvxIdioms()
424 HvxI32Ty = HVC.getHvxTy(Int32Ty, /*Pair=*/false); in HvxIdioms()
425 HvxP32Ty = HVC.getHvxTy(Int32Ty, /*Pair=*/true); in HvxIdioms()
480 const HexagonVectorCombine &HVC; member in __anoncba317990111::HvxIdioms
624 return AddrInfo(HVC, L, L->getPointerOperand(), L->getType(), in getAddrInfo()
627 return AddrInfo(HVC, S, S->getPointerOperand(), in getAddrInfo()
633 return AddrInfo(HVC, II, II->getArgOperand(0), II->getType(), in getAddrInfo()
636 return AddrInfo(HVC, II, II->getArgOperand(1), in getAddrInfo()
645 return HVC.HST.isTypeForHVX(AI.ValTy); in isHvx()
671 return HVC.getFullValue(HVC.getBoolTy(HVC.length(VecTy))); in getMask()
672 return HVC.getFullValue(HVC.getBoolTy()); in getMask()
690 return Builder.CreatePtrAdd(Ptr, HVC.getConstInt(Adjust), "gep"); in createAdjustedPointer()
705 Value *AsInt = Builder.CreatePtrToInt(Ptr, HVC.getIntTy(), "pti"); in createAlignedPointer()
706 Value *Mask = HVC.getConstInt(-Alignment); in createAlignedPointer()
716 bool HvxHasPredLoad = HVC.HST.useHVXV62Ops(); in createLoad()
721 if (HVC.isFalse(Predicate)) in createLoad()
723 if (!HVC.isTrue(Predicate) && HvxHasPredLoad) { in createLoad()
730 assert(!HVC.isUndef(Mask)); // Should this be allowed? in createLoad()
731 if (HVC.isZero(Mask)) in createLoad()
733 if (HVC.isTrue(Mask)) in createLoad()
757 assert(HVC.HST.isTypeForHVX(ValTy) && in createPredicatedLoad()
761 assert(HVC.getSizeOf(ValTy, HVC.Alloc) % Alignment == 0); in createPredicatedLoad()
762 if (HVC.isFalse(Predicate)) in createPredicatedLoad()
764 if (HVC.isTrue(Predicate)) in createPredicatedLoad()
767 auto V6_vL32b_pred_ai = HVC.HST.getIntrinsicId(Hexagon::V6_vL32b_pred_ai); in createPredicatedLoad()
769 return HVC.createHvxIntrinsic(Builder, V6_vL32b_pred_ai, ValTy, in createPredicatedLoad()
770 {Predicate, Ptr, HVC.getConstInt(0)}, in createPredicatedLoad()
777 if (HVC.isZero(Mask) || HVC.isUndef(Val) || HVC.isUndef(Mask)) in createStore()
782 if (HVC.isFalse(Predicate)) in createStore()
784 if (HVC.isTrue(Predicate)) in createStore()
789 if (HVC.isTrue(Mask)) { in createStore()
829 assert(HVC.HST.isTypeForHVX(Val->getType()) && in createPredicatedStore()
832 if (HVC.isFalse(Predicate)) in createPredicatedStore()
834 if (HVC.isTrue(Predicate)) in createPredicatedStore()
837 assert(HVC.getSizeOf(Val, HVC.Alloc) % Alignment == 0); in createPredicatedStore()
838 auto V6_vS32b_pred_ai = HVC.HST.getIntrinsicId(Hexagon::V6_vS32b_pred_ai); in createPredicatedStore()
840 return HVC.createHvxIntrinsic(Builder, V6_vS32b_pred_ai, nullptr, in createPredicatedStore()
841 {Predicate, Ptr, HVC.getConstInt(0), Val}, in createPredicatedStore()
876 if (auto D = HVC.calculatePointerDifference(AI.Addr, W.Addr)) in createAddressGroups()
907 traverseBlock(HVC.DT.getRootNode(), traverseBlock); in createAddressGroups()
917 G.second, [&](auto &I) { return HVC.HST.isTypeForHVX(I.ValTy); }); in createAddressGroups()
943 if (!HVC.isSafeToMoveBeforeInBB(*Info.Inst, Base->getIterator())) in createLoadGroups()
947 return HVC.isSafeToMoveBeforeInBB(*I, Base->getIterator()) && in createLoadGroups()
948 HVC.isSafeToClone(*I); in createLoadGroups()
972 if (!HVC.HST.useHVXV62Ops()) in createLoadGroups()
1003 if (!HVC.isSafeToMoveBeforeInBB(*Info.Inst, Base->getIterator(), Move.Main)) in createStoreGroups()
1023 if (!HVC.HST.useHVXV62Ops()) in createStoreGroups()
1034 return HVC.HST.isHVXVectorType( in createStoreGroups()
1085 assert(HVC.isSafeToClone(*I)); in cloneBefore()
1103 Type *SecTy = HVC.getByteTy(ScLen); in realignLoadGroup()
1105 bool DoAlign = !HVC.isZero(AlignVal); in realignLoadGroup()
1110 auto *True = HVC.getFullValue(HVC.getBoolTy(ScLen)); in realignLoadGroup()
1240 if (!HVC.isSafeToMoveBeforeInBB(*Load, BasePos)) in realignLoadGroup()
1258 Val = HVC.vralignb(Builder, Val, NextLoad, AlignVal); in realignLoadGroup()
1267 Value *Accum = UndefValue::get(HVC.getByteTy(B.Seg.Size)); in realignLoadGroup()
1288 Value *Pay = HVC.vbytes(Builder, getPayload(S->Seg.Val)); in realignLoadGroup()
1290 HVC.insertb(Builder, Accum, Pay, S->Seg.Start, S->Seg.Size, S->Pos); in realignLoadGroup()
1312 Type *SecTy = HVC.getByteTy(ScLen); in realignStoreGroup()
1314 bool DoAlign = !HVC.isZero(AlignVal); in realignStoreGroup()
1337 Value *Zero = HVC.getNullValue(SecTy); in realignStoreGroup()
1342 Value *Mask = HVC.rescale(Builder, MakeVec(Builder, getMask(S.Seg.Val)), in realignStoreGroup()
1343 Pay->getType(), HVC.getByteTy()); in realignStoreGroup()
1344 Value *PartM = HVC.insertb(Builder, Zero, HVC.vbytes(Builder, Mask), in realignStoreGroup()
1348 Value *PartV = HVC.insertb(Builder, Undef, HVC.vbytes(Builder, Pay), in realignStoreGroup()
1369 ASpanV[Index - 1].Seg.Val = HVC.vlalignb(Builder, PrevV, ThisV, AlignVal); in realignStoreGroup()
1370 ASpanM[Index - 1].Seg.Val = HVC.vlalignb(Builder, PrevM, ThisM, AlignVal); in realignStoreGroup()
1383 if (HVC.isUndef(Val) || HVC.isZero(Mask)) in realignStoreGroup()
1395 HVC.vlsb(Builder, Mask), in realignStoreGroup()
1464 InstSimplifyFolder(HVC.DL)); in realignGroup()
1481 AlignVal = HVC.getConstInt(Diff); in realignGroup()
1496 Builder.CreatePtrToInt(WithMinOffset.Addr, HVC.getIntTy(), "pti"); in realignGroup()
1505 VSpan.Blocks.emplace_back(AI.Inst, HVC.getSizeOf(AI.ValTy), in realignGroup()
1512 int ScLen = Move.IsHvx ? HVC.HST.getVectorLength() in realignGroup()
1545 if (!HVC.isByteVecTy(Ty)) in isSectorTy()
1547 int Size = HVC.getSizeOf(Ty); in isSectorTy()
1548 if (HVC.HST.isTypeForHVX(Ty)) in isSectorTy()
1549 return Size == static_cast<int>(HVC.HST.getVectorLength()); in isSectorTy()
1554 LLVM_DEBUG(dbgs() << "Running HVC::AlignVectors on " << HVC.F.getName() in run()
1603 LLVM_DEBUG(dbgs() << "After moveTogether:\n" << HVC.F); in run()
1619 unsigned Bits = HVC.getNumSignificantBits(V, In); in getNumSignificantBits()
1625 KnownBits Known = HVC.getKnownBits(V, In); in getNumSignificantBits()
1725 if ((HVC.length(VecTy) * ElemWidth) % (8 * HVC.HST.getVectorLength()) != 0) in processFxpMul()
1745 InstSimplifyFolder(HVC.DL)); in processFxpMul()
1768 auto *ResizeTy = VectorType::get(HVC.getIntTy(Width), VecTy); in processFxpMul()
1781 unsigned VecLen = HVC.length(ResizeTy); in processFxpMul()
1782 unsigned ChopLen = (8 * HVC.HST.getVectorLength()) / std::min(Width, 32u); in processFxpMul()
1789 ChopOp.X.Val = HVC.subvector(Builder, X, V * ChopLen, ChopLen); in processFxpMul()
1790 ChopOp.Y.Val = HVC.subvector(Builder, Y, V * ChopLen, ChopLen); in processFxpMul()
1799 Value *Cat = HVC.concat(Builder, Results); in processFxpMul()
1847 Value *RoundVal = HVC.getConstSplat(Prod32->getType(), 1 << *Op.RoundAt); in processFxpMulChopped()
1851 Value *ShiftAmt = HVC.getConstSplat(Prod32->getType(), Op.Frac); in processFxpMulChopped()
1862 auto WordX = HVC.splitVectorElements(Builder, Op.X.Val, /*ToWidth=*/32); in processFxpMulChopped()
1863 auto WordY = HVC.splitVectorElements(Builder, Op.Y.Val, /*ToWidth=*/32); in processFxpMulChopped()
1870 Value *Zero = HVC.getNullValue(WordX[0]->getType()); in processFxpMulChopped()
1873 HVC.getConstSplat(HvxWordTy, 1 << (*Op.RoundAt % 32)); in processFxpMulChopped()
1881 Constant *ShiftAmt = HVC.getConstSplat(HvxWordTy, Op.Frac % 32); in processFxpMulChopped()
1899 return HVC.joinVectorElements(Builder, WordP, Op.ResTy); in processFxpMulChopped()
1905 assert(X.Val->getType()->getScalarType() == HVC.getIntTy(16)); in createMulQ15()
1906 assert(HVC.HST.isHVXVectorType(EVT::getEVT(X.Val->getType(), false))); in createMulQ15()
1912 auto V6_vmpyhvsrs = HVC.HST.getIntrinsicId(Hexagon::V6_vmpyhvsrs); in createMulQ15()
1913 return HVC.createHvxIntrinsic(Builder, V6_vmpyhvsrs, X.Val->getType(), in createMulQ15()
1921 assert(InpTy->getScalarType() == HVC.getIntTy(32)); in createMulQ31()
1922 assert(HVC.HST.isHVXVectorType(EVT::getEVT(InpTy, false))); in createMulQ31()
1927 auto V6_vmpyewuh = HVC.HST.getIntrinsicId(Hexagon::V6_vmpyewuh); in createMulQ31()
1929 ? HVC.HST.getIntrinsicId(Hexagon::V6_vmpyowh_rnd_sacc) in createMulQ31()
1930 : HVC.HST.getIntrinsicId(Hexagon::V6_vmpyowh_sacc); in createMulQ31()
1932 HVC.createHvxIntrinsic(Builder, V6_vmpyewuh, InpTy, {X.Val, Y.Val}); in createMulQ31()
1933 return HVC.createHvxIntrinsic(Builder, V6_vmpyo_acc, InpTy, in createMulQ31()
1942 if (VecTy == HvxI32Ty && HVC.HST.useHVXV62Ops()) { in createAddCarry()
1945 if (CarryIn == nullptr && HVC.HST.useHVXV66Ops()) { in createAddCarry()
1946 AddCarry = HVC.HST.getIntrinsicId(Hexagon::V6_vaddcarryo); in createAddCarry()
1948 AddCarry = HVC.HST.getIntrinsicId(Hexagon::V6_vaddcarry); in createAddCarry()
1950 CarryIn = HVC.getNullValue(HVC.getBoolTy(HVC.length(VecTy))); in createAddCarry()
1953 Value *Ret = HVC.createHvxIntrinsic(Builder, AddCarry, in createAddCarry()
1971 auto V6_vandqrt = HVC.HST.getIntrinsicId(Hexagon::V6_vandqrt); in createAddCarry()
1973 HVC.createHvxIntrinsic(Builder, V6_vandqrt, /*RetTy=*/nullptr, in createAddCarry()
1974 {CarryIn, HVC.getConstInt(Mask)}); in createAddCarry()
1990 V6_vmpyh = HVC.HST.getIntrinsicId(Hexagon::V6_vmpyhv); in createMul16()
1993 V6_vmpyh = HVC.HST.getIntrinsicId(Hexagon::V6_vmpyhus); in createMul16()
1995 V6_vmpyh = HVC.HST.getIntrinsicId(Hexagon::V6_vmpyuhv); in createMul16()
2000 HVC.createHvxIntrinsic(Builder, V6_vmpyh, HvxP32Ty, {Y.Val, X.Val}); in createMul16()
2002 return HVC.vshuff(Builder, HVC.sublo(Builder, P), HVC.subhi(Builder, P)); in createMul16()
2007 Type *HvxI16Ty = HVC.getHvxTy(HVC.getIntTy(16), /*Pair=*/false); in createMulH16()
2009 if (HVC.HST.useHVXV69Ops()) { in createMulH16()
2011 auto V6_vmpyuhvs = HVC.HST.getIntrinsicId(Hexagon::V6_vmpyuhvs); in createMulH16()
2012 return HVC.createHvxIntrinsic(Builder, V6_vmpyuhvs, HvxI16Ty, in createMulH16()
2017 Type *HvxP16Ty = HVC.getHvxTy(HVC.getIntTy(16), /*Pair=*/true); in createMulH16()
2020 unsigned Len = HVC.length(HvxP16Ty) / 2; in createMulH16()
2027 HVC.sublo(Builder, Pair16), HVC.subhi(Builder, Pair16), PickOdd, "shf"); in createMulH16()
2046 Value *Parts = HVC.createHvxIntrinsic(Builder, V6_vmpy_parts, nullptr, in createMul32()
2061 if (HVC.isZero(WordX[Idx])) in createAddLong()
2063 else if (HVC.isZero(WordY[Idx])) in createAddLong()
2098 Value *Zero = HVC.getNullValue(WordX[0]->getType()); in createMulLong()
2133 for (BasicBlock &B : HVC.F) { in run()
2143 RecursivelyDeleteTriviallyDeadInstructions(&*It, &HVC.TLI); in run()
2970 HexagonVectorCombine HVC(F, AA, AC, DT, SE, TLI, TM); in runOnFunction() local
2971 return HVC.run(); in runOnFunction()