[llvm] [NVPTX] Skip processing BasicBlocks with single unreachable instruction in `nvptx-lower-unreachable` pass. (PR #72641)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 15 02:16:06 PST 2024
mmoadeli wrote:
> You can use `-mllvm -nvptx-exit-on-unreachable=0` option to disable lowering unreachable as exit, as a workaround.
>
> > there is nothing to be done at source level to address this issue.
>
> That remains to be seen. There are certainly ways to tell compiler that some values are guaranteed not to be seen. E.g. something as simple as an explicit `if (threadIdx.x <4 ) switch { case 0...3 ...}` would probably do the trick.
Thanks @Artem-B and apologies for late reply.
I updated the PR to be more generic and not specific to a particular instruction.
https://github.com/llvm/llvm-project/pull/72641
More information about the llvm-commits
mailing list