[llvm] [NVPTX] Handle unreachable default in llvm::SwitchIns. (PR #72641)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 15:05:56 PST 2024


Artem-B 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.




https://github.com/llvm/llvm-project/pull/72641


More information about the llvm-commits mailing list