<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64365>64365</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang generates ill-formed PTX (parsing error with ptxas)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ptal
      </td>
    </tr>
</table>

<pre>
    I think the ptx generated by Clang on my program is wrong, so ptxas cannot parse it. Here the files generated from the compilation [bug.zip](https://github.com/llvm/llvm-project/files/12247562/bug.zip). Let me know if I can help to reproduce it.

```
ptxas /tmp/turbo-sm_75-681a73.s, line 9901630; fatal   : Parsing error near '.': syntax error
ptxas fatal   : Ptx assembly aborted due to errors
clang++-18: error: ptxas command failed with exit code 255 (use -v to see invocation)
Ubuntu clang version 18.0.0 (++20230727042307+fe9c3c786837-1~exp1~20230727042428.1083)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang++-18: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++-18: note: diagnostic msg: /tmp/turbo-30c03f.cu
clang++-18: note: diagnostic msg: /tmp/turbo-sm_75-a22b7c.cu
clang++-18: note: diagnostic msg: /tmp/turbo-30c03f.sh
clang++-18: note: diagnostic msg: 

********************
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVU1v2zgT_jX0ZWCBIq2vgw52EjcBgjdB6-LdW0FJI4lbihRIKnH20N--IBVnk8Meui0giLCH88zHM_NIOCcHjViT7ECy641Y_GhsPXuhNo3pXuo78KPU38GPCLM_w4AarfDYQfMCV0roAYyG6QVmawYrJpAOnq3RA2FX4EzwEQ5aobXxMAvrEKRP4BYtRsxeKnTvUHtrpmhozTRLJbw0Gkh2aJYh-UvOJLsmrBy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