[PATCH] D147783: [VPlan] Add stride->constant VPlan mapping at construction.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 9 01:30:56 PDT 2023
Ayal added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8914
+ else
+ Plan->addVPValue(Stride, new VPValue(CI));
+ }
----------------
nit: can alternatively do
```
Plan->getOrAddVPValue(Stride);
assert(Plan->getVPValue(Stride)->getLiveInIRValue() == CI &&
"Adding different constants for the same stride!");
```
?
================
Comment at: llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll:304
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
; CHECK-NEXT: [[OFFSET_IDX:%.*]] = mul i64 [[INDEX]], [[STRIDE]]
; CHECK-NEXT: [[TMP5:%.*]] = mul i64 0, [[STRIDE]]
----------------
peixin wrote:
> This symbolic stride is still here.
Right, this seems to catch (++IV)*stride cases but miss IV+=stride ones...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147783/new/
https://reviews.llvm.org/D147783
More information about the llvm-commits
mailing list