[PATCH] D119669: [NVPTX] Prefix "$L__" for branch label names
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 28 14:32:07 PDT 2022
tra added a comment.
In D119669#3322138 <https://reviews.llvm.org/D119669#3322138>, @slydiman wrote:
> It seems this patch requires CUDA 11.3 and PTX ISA v7.3 at least.
Can you elaborate on what exactly is failing with older versions? AFAICT, `$...` is accepted by ptxas going back as far as CUDA-9.0: https://godbolt.org/z/G5n7E9xYz
On a side note, it's apparently possible to have a global or function to start with `$`: https://godbolt.org/z/zW41xPnPd, https://godbolt.org/z/srjdh3a46
So, prefixing with `$` does not solve the problem completely.
We may be better off using `%` or just `__` as the prefix. While it's possible to have a conflict with the latter one, at least the end users are not supposed to use it.
In D119669#3322138 <https://reviews.llvm.org/D119669#3322138>, @slydiman wrote:
> In D119669#3320786 <https://reviews.llvm.org/D119669#3320786>, @tra wrote:
>
>> @slydiman please verify that clang-generated PTX with the patch does get accepted by ptxas. I'm not quite sure what went wrong here and we can't test it in clang/llvm in-tree tests as they don't have access to CUDA SDK.
>
> It seems this patch requires CUDA 11.3 and PTX ISA v7.3 at least.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119669/new/
https://reviews.llvm.org/D119669
More information about the llvm-commits
mailing list