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