[PATCH] D87439: [SVE] In LoopIdiomRecognize::isLegalStore bail out for scalable vectors
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 15:59:05 PDT 2020
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp:475
+ // non-constant stride too, since the code below currently only works for
+ // constant strides.
+ TypeSize SizeInBits = DL->getTypeSizeInBits(StoredVal->getType());
----------------
david-arm wrote:
> efriedma wrote:
> > Do you have any idea why we're checking whether the store overflows an unsigned?
> Hi @efriedma, honestly I don't know why we check for overflow here, although I assumed it was probably because they wanted to multiply the store size by something else at some point, so want to ensure it fits in a 64-bit value. That's a pure guess though! I can look into this further if you want, but there is still the issue of non-constant strides and extra maths to deal with.
In that case, please simplify the comment to just say the code needs changes to deal with a non-constant stride.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87439/new/
https://reviews.llvm.org/D87439
More information about the llvm-commits
mailing list