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