[PATCH] D101916: [LoopVectorize] Fix crach for predicate instruction with scalable VF
Caroline via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 5 09:01:45 PDT 2021
CarolineConcatto created this revision.
Herald added a subscriber: hiraditya.
CarolineConcatto requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch adds a function that checks if inside a loop there is a scalar
predicated instruction. There is no support for vectorization of loops
with division because the vectorizer cannot guarantee that zero divisions
will not happen.
This patch adds a check in computeFeasibleMaxVF. If the instruction is not
supported for scalable VF, computeFeasibleMaxVF will fall back using
fixed-width vectorization.
This loop now does not use VF scalable
for (long long i = 0; i < n; i++)
if (cond[i])
a[i] /= b[i];
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101916
Files:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/scalable-predicate-instruction.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101916.343068.patch
Type: text/x-patch
Size: 5845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210505/0ddcb4ea/attachment.bin>
More information about the llvm-commits
mailing list