@@ -10218,9 +10218,9 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10218
10218
// sub-Mask into the CommonMask to estimate it later and avoid double cost
10219
10219
// estimation.
10220
10220
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)) {
10224
10224
unsigned Limit = getNumElems(Mask.size(), SliceSize, Part);
10225
10225
assert(all_of(ArrayRef(CommonMask).slice(Part * SliceSize, Limit),
10226
10226
[](int Idx) { return Idx == PoisonMaskElem; }) &&
@@ -10246,7 +10246,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10246
10246
VF = std::max(VF,
10247
10247
cast<FixedVectorType>(V1->getType())->getNumElements());
10248
10248
} else {
10249
- const auto *E = InVectors.front().get <const TreeEntry *>();
10249
+ const auto *E = cast <const TreeEntry *>(InVectors.front() );
10250
10250
VF = std::max(VF, E->getVectorFactor());
10251
10251
}
10252
10252
for (unsigned Idx = 0, Sz = CommonMask.size(); Idx < Sz; ++Idx)
@@ -10262,7 +10262,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10262
10262
VF = std::max(VF,
10263
10263
getNumElements(V1->getType()));
10264
10264
} else {
10265
- const auto *E = P.get <const TreeEntry *>();
10265
+ const auto *E = cast <const TreeEntry *>(P );
10266
10266
VF = std::max(VF, E->getVectorFactor());
10267
10267
}
10268
10268
for (unsigned Idx = 0, Sz = CommonMask.size(); Idx < Sz; ++Idx)
@@ -10368,9 +10368,9 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10368
10368
};
10369
10369
if (!V1 && !V2 && !P2.isNull()) {
10370
10370
// Shuffle 2 entry nodes.
10371
- const TreeEntry *E = P1.get <const TreeEntry *>();
10371
+ const TreeEntry *E = cast <const TreeEntry *>(P1 );
10372
10372
unsigned VF = E->getVectorFactor();
10373
- const TreeEntry *E2 = P2.get <const TreeEntry *>();
10373
+ const TreeEntry *E2 = cast <const TreeEntry *>(P2 );
10374
10374
CommonVF = std::max(VF, E2->getVectorFactor());
10375
10375
assert(all_of(Mask,
10376
10376
[=](int Idx) {
@@ -10402,7 +10402,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10402
10402
V2 = getAllOnesValue(*R.DL, getWidenedType(ScalarTy, CommonVF));
10403
10403
} else if (!V1 && P2.isNull()) {
10404
10404
// Shuffle single entry node.
10405
- const TreeEntry *E = P1.get <const TreeEntry *>();
10405
+ const TreeEntry *E = cast <const TreeEntry *>(P1 );
10406
10406
unsigned VF = E->getVectorFactor();
10407
10407
CommonVF = VF;
10408
10408
assert(
@@ -10451,7 +10451,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10451
10451
} else if (V1 && !V2) {
10452
10452
// Shuffle vector and tree node.
10453
10453
unsigned VF = getVF(V1);
10454
- const TreeEntry *E2 = P2.get <const TreeEntry *>();
10454
+ const TreeEntry *E2 = cast <const TreeEntry *>(P2 );
10455
10455
CommonVF = std::max(VF, E2->getVectorFactor());
10456
10456
assert(all_of(Mask,
10457
10457
[=](int Idx) {
@@ -10477,7 +10477,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10477
10477
} else if (!V1 && V2) {
10478
10478
// Shuffle vector and tree node.
10479
10479
unsigned VF = getVF(V2);
10480
- const TreeEntry *E1 = P1.get <const TreeEntry *>();
10480
+ const TreeEntry *E1 = cast <const TreeEntry *>(P1 );
10481
10481
CommonVF = std::max(VF, E1->getVectorFactor());
10482
10482
assert(all_of(Mask,
10483
10483
[=](int Idx) {
@@ -10715,8 +10715,8 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10715
10715
if (P.value() == PoisonMaskElem)
10716
10716
return Mask[P.index()] == PoisonMaskElem;
10717
10717
auto *EI = cast<ExtractElementInst>(
10718
- InVectors.front().get <const TreeEntry *>()->getOrdered(
10719
- P.index()));
10718
+ cast <const TreeEntry *>(InVectors.front())
10719
+ ->getOrdered( P.index()));
10720
10720
return EI->getVectorOperand() == V1 ||
10721
10721
EI->getVectorOperand() == V2;
10722
10722
}) &&
@@ -10734,7 +10734,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10734
10734
if (ForExtracts) {
10735
10735
// No need to add vectors here, already handled them in adjustExtracts.
10736
10736
assert(
10737
- InVectors.size() == 1 && InVectors.front().is <const TreeEntry *>() &&
10737
+ InVectors.size() == 1 && isa <const TreeEntry *>(InVectors.front() ) &&
10738
10738
!CommonMask.empty() &&
10739
10739
all_of(enumerate(CommonMask),
10740
10740
[&](auto P) {
@@ -10764,7 +10764,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10764
10764
VF = std::max(VF, InTE->getVectorFactor());
10765
10765
} else {
10766
10766
VF = std::max(
10767
- VF, cast<FixedVectorType>(InVectors.front().get <Value *>()->getType())
10767
+ VF, cast<FixedVectorType>(cast <Value *>(InVectors.front() )->getType())
10768
10768
->getNumElements());
10769
10769
}
10770
10770
InVectors.push_back(V1);
@@ -10834,7 +10834,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
10834
10834
CommonMask[Idx] = Idx;
10835
10835
assert(VF > 0 &&
10836
10836
"Expected vector length for the final value before action.");
10837
- Value *V = Vec.get <Value *>();
10837
+ Value *V = cast <Value *>(Vec );
10838
10838
Action(V, CommonMask);
10839
10839
InVectors.front() = V;
10840
10840
}
0 commit comments