@@ -4819,12 +4819,6 @@ BoUpSLP::LoadsState BoUpSLP::canVectorizeLoads(
4819
4819
// representation is better than just gather.
4820
4820
auto CheckForShuffledLoads = [&, &TTI = *TTI](Align CommonAlignment,
4821
4821
bool ProfitableGatherPointers) {
4822
- // FIXME: The following code has not been updated for non-power-of-2
4823
- // vectors. The splitting logic here does not cover the original
4824
- // vector if the vector factor is not a power of two. FIXME
4825
- if (!has_single_bit(VL.size()))
4826
- return false;
4827
-
4828
4822
// Compare masked gather cost and loads + insert subvector costs.
4829
4823
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput;
4830
4824
auto [ScalarGEPCost, VectorGEPCost] =
@@ -4874,6 +4868,13 @@ BoUpSLP::LoadsState BoUpSLP::canVectorizeLoads(
4874
4868
constexpr unsigned ListLimit = 4;
4875
4869
if (!TryRecursiveCheck || VL.size() < ListLimit)
4876
4870
return MaskedGatherCost - GatherCost >= -SLPCostThreshold;
4871
+
4872
+ // FIXME: The following code has not been updated for non-power-of-2
4873
+ // vectors. The splitting logic here does not cover the original
4874
+ // vector if the vector factor is not a power of two. FIXME
4875
+ if (!has_single_bit(VL.size()))
4876
+ return false;
4877
+
4877
4878
unsigned Sz = DL->getTypeSizeInBits(ScalarTy);
4878
4879
unsigned MinVF = getMinVF(2 * Sz);
4879
4880
DemandedElts.clearAllBits();
0 commit comments