@@ -770,7 +770,7 @@ static unsigned getFullUnrollBoostingFactor(const EstimatedUnrollCost &Cost,
770
770
static std::optional<unsigned >
771
771
shouldPragmaUnroll (Loop *L, const PragmaInfo &PInfo,
772
772
const unsigned TripMultiple, const unsigned TripCount,
773
- unsigned MaxTripCount, const UnrollCostEstimator UCE,
773
+ const UnrollCostEstimator UCE,
774
774
const TargetTransformInfo::UnrollingPreferences &UP) {
775
775
776
776
// Using unroll pragma
@@ -800,10 +800,6 @@ shouldPragmaUnroll(Loop *L, const PragmaInfo &PInfo,
800
800
return TripCount;
801
801
}
802
802
803
- if (PInfo.PragmaEnableUnroll && !TripCount && MaxTripCount &&
804
- MaxTripCount <= UP.MaxUpperBound )
805
- return MaxTripCount;
806
-
807
803
// if didn't return until here, should continue to other priorties
808
804
return std::nullopt;
809
805
}
@@ -930,7 +926,7 @@ bool llvm::computeUnrollCount(
930
926
// 1st priority is unroll count set by "unroll-count" option.
931
927
// 2nd priority is unroll count set by pragma.
932
928
if (auto UnrollFactor = shouldPragmaUnroll (L, PInfo, TripMultiple, TripCount,
933
- MaxTripCount, UCE, UP)) {
929
+ UCE, UP)) {
934
930
UP.Count = *UnrollFactor;
935
931
936
932
if (UserUnrollCount || (PragmaCount > 0 )) {
0 commit comments