@@ -10218,9 +10218,9 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1021810218 // sub-Mask into the CommonMask to estimate it later and avoid double cost
1021910219 // estimation.
1022010220 if ((InVectors.size() == 2 &&
10221- InVectors.front().get <const TreeEntry *>() == &E1 &&
10222- InVectors.back().get <const TreeEntry *>() == E2) ||
10223- (!E2 && InVectors.front().get <const TreeEntry *>() == &E1)) {
10221+ cast <const TreeEntry *>(InVectors.front() ) == &E1 &&
10222+ cast <const TreeEntry *>(InVectors.back() ) == E2) ||
10223+ (!E2 && cast <const TreeEntry *>(InVectors.front() ) == &E1)) {
1022410224 unsigned Limit = getNumElems(Mask.size(), SliceSize, Part);
1022510225 assert(all_of(ArrayRef(CommonMask).slice(Part * SliceSize, Limit),
1022610226 [](int Idx) { return Idx == PoisonMaskElem; }) &&
@@ -10246,7 +10246,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1024610246 VF = std::max(VF,
1024710247 cast<FixedVectorType>(V1->getType())->getNumElements());
1024810248 } else {
10249- const auto *E = InVectors.front().get <const TreeEntry *>();
10249+ const auto *E = cast <const TreeEntry *>(InVectors.front() );
1025010250 VF = std::max(VF, E->getVectorFactor());
1025110251 }
1025210252 for (unsigned Idx = 0, Sz = CommonMask.size(); Idx < Sz; ++Idx)
@@ -10262,7 +10262,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1026210262 VF = std::max(VF,
1026310263 getNumElements(V1->getType()));
1026410264 } else {
10265- const auto *E = P.get <const TreeEntry *>();
10265+ const auto *E = cast <const TreeEntry *>(P );
1026610266 VF = std::max(VF, E->getVectorFactor());
1026710267 }
1026810268 for (unsigned Idx = 0, Sz = CommonMask.size(); Idx < Sz; ++Idx)
@@ -10368,9 +10368,9 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1036810368 };
1036910369 if (!V1 && !V2 && !P2.isNull()) {
1037010370 // Shuffle 2 entry nodes.
10371- const TreeEntry *E = P1.get <const TreeEntry *>();
10371+ const TreeEntry *E = cast <const TreeEntry *>(P1 );
1037210372 unsigned VF = E->getVectorFactor();
10373- const TreeEntry *E2 = P2.get <const TreeEntry *>();
10373+ const TreeEntry *E2 = cast <const TreeEntry *>(P2 );
1037410374 CommonVF = std::max(VF, E2->getVectorFactor());
1037510375 assert(all_of(Mask,
1037610376 [=](int Idx) {
@@ -10402,7 +10402,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1040210402 V2 = getAllOnesValue(*R.DL, getWidenedType(ScalarTy, CommonVF));
1040310403 } else if (!V1 && P2.isNull()) {
1040410404 // Shuffle single entry node.
10405- const TreeEntry *E = P1.get <const TreeEntry *>();
10405+ const TreeEntry *E = cast <const TreeEntry *>(P1 );
1040610406 unsigned VF = E->getVectorFactor();
1040710407 CommonVF = VF;
1040810408 assert(
@@ -10451,7 +10451,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1045110451 } else if (V1 && !V2) {
1045210452 // Shuffle vector and tree node.
1045310453 unsigned VF = getVF(V1);
10454- const TreeEntry *E2 = P2.get <const TreeEntry *>();
10454+ const TreeEntry *E2 = cast <const TreeEntry *>(P2 );
1045510455 CommonVF = std::max(VF, E2->getVectorFactor());
1045610456 assert(all_of(Mask,
1045710457 [=](int Idx) {
@@ -10477,7 +10477,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1047710477 } else if (!V1 && V2) {
1047810478 // Shuffle vector and tree node.
1047910479 unsigned VF = getVF(V2);
10480- const TreeEntry *E1 = P1.get <const TreeEntry *>();
10480+ const TreeEntry *E1 = cast <const TreeEntry *>(P1 );
1048110481 CommonVF = std::max(VF, E1->getVectorFactor());
1048210482 assert(all_of(Mask,
1048310483 [=](int Idx) {
@@ -10715,8 +10715,8 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1071510715 if (P.value() == PoisonMaskElem)
1071610716 return Mask[P.index()] == PoisonMaskElem;
1071710717 auto *EI = cast<ExtractElementInst>(
10718- InVectors.front().get <const TreeEntry *>()->getOrdered(
10719- P.index()));
10718+ cast <const TreeEntry *>(InVectors.front())
10719+ ->getOrdered( P.index()));
1072010720 return EI->getVectorOperand() == V1 ||
1072110721 EI->getVectorOperand() == V2;
1072210722 }) &&
@@ -10734,7 +10734,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1073410734 if (ForExtracts) {
1073510735 // No need to add vectors here, already handled them in adjustExtracts.
1073610736 assert(
10737- InVectors.size() == 1 && InVectors.front().is <const TreeEntry *>() &&
10737+ InVectors.size() == 1 && isa <const TreeEntry *>(InVectors.front() ) &&
1073810738 !CommonMask.empty() &&
1073910739 all_of(enumerate(CommonMask),
1074010740 [&](auto P) {
@@ -10764,7 +10764,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1076410764 VF = std::max(VF, InTE->getVectorFactor());
1076510765 } else {
1076610766 VF = std::max(
10767- VF, cast<FixedVectorType>(InVectors.front().get <Value *>()->getType())
10767+ VF, cast<FixedVectorType>(cast <Value *>(InVectors.front() )->getType())
1076810768 ->getNumElements());
1076910769 }
1077010770 InVectors.push_back(V1);
@@ -10834,7 +10834,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1083410834 CommonMask[Idx] = Idx;
1083510835 assert(VF > 0 &&
1083610836 "Expected vector length for the final value before action.");
10837- Value *V = Vec.get <Value *>();
10837+ Value *V = cast <Value *>(Vec );
1083810838 Action(V, CommonMask);
1083910839 InVectors.front() = V;
1084010840 }
0 commit comments