File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1308,6 +1308,18 @@ class LoopVectorizationCostModel {
1308
1308
(SI && TTI.isLegalMaskedScatter (Ty, Align));
1309
1309
}
1310
1310
1311
+ // / Returns true if the target machine can represent \p V as a strided load
1312
+ // / or store operation.
1313
+ bool isLegalStridedLoadStore (Value *V, ElementCount VF) {
1314
+ if (!isa<LoadInst, StoreInst>(V))
1315
+ return false ;
1316
+ auto *Ty = getLoadStoreType (V);
1317
+ Align Align = getLoadStoreAlignment (V);
1318
+ if (VF.isVector ())
1319
+ Ty = VectorType::get (Ty, VF);
1320
+ return TTI.isLegalStridedLoadStore (Ty, Align);
1321
+ }
1322
+
1311
1323
// / Returns true if the target machine supports all of the reduction
1312
1324
// / variables found for the given VF.
1313
1325
bool canVectorizeReductions (ElementCount VF) const {
You can’t perform that action at this time.
0 commit comments