File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3475,12 +3475,13 @@ bool LoopVectorizationCostModel::stridedAccessCanBeWidened(
3475
3475
if (!VF.isVector ())
3476
3476
return false ;
3477
3477
3478
- auto *Ptr = getLoadStorePointerOperand (I);
3478
+ [[maybe_unused]] auto *Ptr = getLoadStorePointerOperand (I);
3479
3479
auto *ScalarTy = getLoadStoreType (I);
3480
- // Ensure the accessed addresses are evenly spaced apart by a fixed stride.
3481
- // TODO: Support non-unit-reverse strided accesses.
3482
- if (Legal->isConsecutivePtr (ScalarTy, Ptr ) != -1 )
3483
- return false ;
3480
+ // TODO: Support non-unit-reverse strided accesses. Add stride analysis here
3481
+ // to ensure that the accessed addresses are evenly spaced apart by a fixed
3482
+ // stride.
3483
+ assert (Legal->isConsecutivePtr (ScalarTy, Ptr ) == -1 &&
3484
+ " Only supports strided accesses with a stride of -1" );
3484
3485
3485
3486
const Align Alignment = getLoadStoreAlignment (I);
3486
3487
return TTI.isLegalStridedLoadStore (toVectorTy (ScalarTy, VF), Alignment);
You can’t perform that action at this time.
0 commit comments