@@ -1129,12 +1129,12 @@ static bool findHistogram(LoadInst *LI, StoreInst *HSt, Loop *TheLoop,
1129
1129
return true ;
1130
1130
}
1131
1131
1132
- bool LoopVectorizationLegality::canVectorizeUnknownDependences () {
1132
+ bool LoopVectorizationLegality::canVectorizeUncheckedDependences () {
1133
1133
// For now, we only support an unknown dependency that calculates a histogram
1134
1134
if (!EnableHistogramVectorization)
1135
1135
return false ;
1136
1136
1137
- // FIXME: Support more than one unknown dependence, and check to see if some
1137
+ // FIXME: Support more than one unchecked dependence, and check to see if some
1138
1138
// are handled by runtime checks before looking for histograms.
1139
1139
LAI = &LAIs.getInfo (*TheLoop);
1140
1140
const MemoryDepChecker &DepChecker = LAI->getDepChecker ();
@@ -1144,8 +1144,9 @@ bool LoopVectorizationLegality::canVectorizeUnknownDependences() {
1144
1144
1145
1145
const MemoryDepChecker::Dependence &Dep = (*Deps).front ();
1146
1146
1147
- // We're only interested in unknown dependences.
1148
- if (Dep.Type != MemoryDepChecker::Dependence::Unknown)
1147
+ // We're only interested in Unknown or IndirectUnsafe dependences.
1148
+ if (Dep.Type != MemoryDepChecker::Dependence::Unknown &&
1149
+ Dep.Type != MemoryDepChecker::Dependence::IndirectUnsafe)
1149
1150
return false ;
1150
1151
1151
1152
// For now only normal loads and stores are supported.
@@ -1170,7 +1171,7 @@ bool LoopVectorizationLegality::canVectorizeMemory() {
1170
1171
}
1171
1172
1172
1173
if (!LAI->canVectorizeMemory ())
1173
- return canVectorizeUnknownDependences ();
1174
+ return canVectorizeUncheckedDependences ();
1174
1175
1175
1176
if (LAI->hasLoadStoreDependenceInvolvingLoopInvariantAddress ()) {
1176
1177
reportVectorizationFailure (" We don't allow storing to uniform addresses" ,
0 commit comments