[PATCH] D113578: [SCEV] Apply loop guards when computing max BTC for arbitrary steps.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 14 03:52:01 PST 2021


fhahn marked an inline comment as done.
fhahn added a comment.

In D113578#3188878 <https://reviews.llvm.org/D113578#3188878>, @alexfh wrote:

> A bit cleaner test case: F21011938: q2.cc <https://reviews.llvm.org/F21011938>
>
>   $ ./clang-before -cc1 -triple x86_64-unknown-linux -S -target-feature +sse4.2 -O2 q2.cc
>   $ ./clang-after -cc1 -triple x86_64-unknown-linux -S -target-feature +sse4.2 -O2 q2.cc
>   Stack dump:
>   0.      Program arguments: ./clang-after -cc1 -triple x86_64-unknown-linux -S -target-feature +sse4.2 -O2 q2.cc
>   1.      <eof> parser at end of file
>   2.      Code generation
>   3.      Running pass 'Function Pass Manager' on module 'q2.cc'.
>   4.      Running pass 'Loop Pass Manager' on function '@_Z1fv'
>   5.      Running pass 'Induction Variable Users' on basic block '%arraydestroy.body86029'
>   ...
>
> Alternatively, the corresponding IR file:
> F21011987: q2.ll <https://reviews.llvm.org/F21011987>
>
>   $ ./clang-after -cc1 -triple x86_64-unknown-linux -S -target-feature +sse4.2 -O2 q2.ll
>   Stack dump:
>   0.      Program arguments: ./clang-after -cc1 -triple x86_64-unknown-linux -S -target-feature +sse4.2 -O2 q2.ll
>   1.      Code generation
>   2.      Running pass 'Function Pass Manager' on module 'q2.ll'.
>   3.      Running pass 'Loop Pass Manager' on function '@_Z1fv'
>   4.      Running pass 'Induction Variable Users' on basic block '%arraydestroy.body86029'
>   ...

Thanks for the heads-up, I'll take a look now. But from the stack trace you shared, I doubt that the patch itself is causing the crash, but rather exposes an existing bug in `GetMinTrailingZeros`/`computeKnownBits`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113578



More information about the llvm-commits mailing list