[PATCH] D90687: [LV] Clamp VF hint when unsafe

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 15 10:07:10 PST 2021


c-rhodes added a comment.

In D90687#2501292 <https://reviews.llvm.org/D90687#2501292>, @iajbar wrote:

> I configured and built llvm with:
> cmake -G Ninja -DLLVM_TARGETS_TO_BUILD:STRING=Hexagon -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=hexagon-unknown-elf -DLLVM_TARGET_ARCH:STRING=hexagon-unknown-elf -DLLVM_ENABLE_ASSERTIONS:BOOL=ON -DLLVM_PARALLEL_LINK_JOBS=1 '-DLLVM_ENABLE_PROJECTS=llvm;clang' -DBUILD_SHARED_LIBS:BOOL=ON ..
>
> This patch causes an assert with this testcase:
> typedef struct {
>
>   char a;
>
> } b;
> b *c;
> int d, e;
> int f() {
>
>   int g = 0;
>   for (; d; d++) {
>     e = 0;
>     for (; e < c[d].a; e++)
>       g++;
>   }
>   return g;
>
> }
> clang -Os -mhvx -fvectorize -mv67 testcase.i -S -o -
>
> llvm::LoopVectorizationCostModel::computeMaxVF(llvm::ElementCount, unsigned int): Assertion `WideningDecisions.empty() && Uniforms.empty() && Scalars.empty() && "No decisions should have been taken at this point"' failed.

Thanks for reporting. I reproduced the crash but found it also occurs before this landed (I tried commit eeba70a <https://reviews.llvm.org/rGeeba70a463c70c76868421e08c4036c70bfad994>), so I'm not sure it's this patch causing the issue. Could you confirm this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90687/new/

https://reviews.llvm.org/D90687



More information about the llvm-commits mailing list