@@ -3204,7 +3204,7 @@ void LoopVectorizationCostModel::collectLoopScalars(ElementCount VF) {
3204
3204
3205
3205
// Determine if all users of the induction variable are scalar after
3206
3206
// vectorization.
3207
- auto ScalarInd = llvm::all_of (Ind->users (), [&](User *U) -> bool {
3207
+ bool ScalarInd = llvm::all_of (Ind->users (), [&](User *U) -> bool {
3208
3208
auto *I = cast<Instruction>(U);
3209
3209
return I == IndUpdate || !TheLoop->contains (I) || Worklist.count (I) ||
3210
3210
IsDirectLoadStoreFromPtrIndvar (Ind, I);
@@ -3221,7 +3221,7 @@ void LoopVectorizationCostModel::collectLoopScalars(ElementCount VF) {
3221
3221
3222
3222
// Determine if all users of the induction variable update instruction are
3223
3223
// scalar after vectorization.
3224
- auto ScalarIndUpdate =
3224
+ bool ScalarIndUpdate =
3225
3225
llvm::all_of (IndUpdate->users (), [&](User *U) -> bool {
3226
3226
auto *I = cast<Instruction>(U);
3227
3227
return I == Ind || !TheLoop->contains (I) || Worklist.count (I) ||
@@ -3649,11 +3649,10 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
3649
3649
if (IsOutOfScope (V))
3650
3650
continue ;
3651
3651
auto *I = cast<Instruction>(V);
3652
- auto UsersAreMemAccesses =
3653
- llvm::all_of (I->users (), [&](User *U) -> bool {
3654
- auto *UI = cast<Instruction>(U);
3655
- return TheLoop->contains (UI) && IsVectorizedMemAccessUse (UI, V);
3656
- });
3652
+ bool UsersAreMemAccesses = llvm::all_of (I->users (), [&](User *U) -> bool {
3653
+ auto *UI = cast<Instruction>(U);
3654
+ return TheLoop->contains (UI) && IsVectorizedMemAccessUse (UI, V);
3655
+ });
3657
3656
if (UsersAreMemAccesses)
3658
3657
AddToWorklistIfAllowed (I);
3659
3658
}
@@ -3698,7 +3697,7 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
3698
3697
3699
3698
// Determine if all users of the induction variable are uniform after
3700
3699
// vectorization.
3701
- auto UniformInd = llvm::all_of (Ind->users (), [&](User *U) -> bool {
3700
+ bool UniformInd = llvm::all_of (Ind->users (), [&](User *U) -> bool {
3702
3701
auto *I = cast<Instruction>(U);
3703
3702
return I == IndUpdate || !TheLoop->contains (I) || Worklist.count (I) ||
3704
3703
IsVectorizedMemAccessUse (I, Ind);
@@ -3708,7 +3707,7 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
3708
3707
3709
3708
// Determine if all users of the induction variable update instruction are
3710
3709
// uniform after vectorization.
3711
- auto UniformIndUpdate =
3710
+ bool UniformIndUpdate =
3712
3711
llvm::all_of (IndUpdate->users (), [&](User *U) -> bool {
3713
3712
auto *I = cast<Instruction>(U);
3714
3713
return I == Ind || !TheLoop->contains (I) || Worklist.count (I) ||
0 commit comments