[PATCH] D115302: GlobalsModRef should treat functions w/o nosync conservatively.
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 9 14:43:05 PST 2021
tra added a comment.
In D115302#3183952 <https://reviews.llvm.org/D115302#3183952>, @efriedma wrote:
> The bug being fixed here isn't exclusive to intrinsics. The following shows the same issue using a spinloop:
> Given that, I don't think this whole tangent about the control flow graph and hardcoding which intrinsics are nocallback is relevant to this bug.
My suggestion was about listing the intrinsics that act as a barrier. I.e. teach GlobalModRef that `@llvm.nvvm.barrier0` is a `ModRef` for all values. While it's not a proper fix, it does force LLVM to be more conservative about memory accesses on both sizes of it and prevents miscompilation. While not pretty, the work-around is narrow in scope and does not block general work on having these issues fixed properly.
Intrinsics being treated differently from functions because of assumed `nocallback` is an independent issue.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115302/new/
https://reviews.llvm.org/D115302
More information about the llvm-commits
mailing list