[PATCH] D99719: [SLP] Better estimate cost of no-op extracts on target vectors.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 2 10:52:10 PDT 2021
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3476
+ // Reached the start of a new vector registers.
+ if (Idx % EltsPerVector == 0) {
+ AllConsecutive = true;
----------------
MaskRay wrote:
> I have seen a case where
>
> ```
> VecTy->getNumElements() == 2
> NumOfParts == 4
> EltsPerVector == 0
> Idx == 0
> ```
>
> So divide-by-zero SIGFPE. Trying to reduce to a test case, but how should I paper over the problem quickly?
Oh right, that's interesting! Perhaps a vector with an element type that does not fit into a single register?
For those cases, the logic below should not apply I think, so perhaps adding a build out on ExltsPerVector == 0 after computing it?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99719/new/
https://reviews.llvm.org/D99719
More information about the llvm-commits
mailing list