[PATCH] D101103: [InstSimplify] Treat invariant group insts as bitcasts for load operands

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 11:51:47 PDT 2021


lebedev.ri added a comment.

In D101103#2808706 <https://reviews.llvm.org/D101103#2808706>, @clin1 wrote:

> Hi @aeubanks, we turned up a corner case where jump threading is creating a self-referential GEP:
>
>   %tmp27 = getelementptr inbounds i8, i8* %tmp27, i64 1
>
> Surprisingly, this is allowed in unreachable code:
> https://lists.llvm.org/pipermail/llvm-dev/2012-October/054719.html
>
> The self reference causes InstSimplify to hang when it's called from JT.
> Test case "reduced.ll" attached. Would you mind checking it out? Thank you!F17315031: reduced.ll <https://reviews.llvm.org/F17315031>

The fix should lie in jumpthreading - it should not deal with unreachable blocks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101103



More information about the llvm-commits mailing list