[NVPTX] Fix LIT tests with default nameTableKind
authorAndrew Savonichev <andrew.savonichev@gmail.com>
Tue, 19 Apr 2022 17:01:14 +0000 (20:01 +0300)
committerAndrew Savonichev <andrew.savonichev@gmail.com>
Thu, 21 Apr 2022 13:05:25 +0000 (16:05 +0300)
commit96e7487013776c26f0a5203b2e4b104b61efcedf
tree4f3f3349000f4f242881e444f2e2522f6f54b146
parentac213375d9639974a29db99c5a9d145d2397385c
[NVPTX] Fix LIT tests with default nameTableKind

Default nameTableKind results in the following DWARF section:

    .section .debug_pubnames
    {
      .b32 LpubNames_end0-LpubNames_start0    // Length of Public Names Info
      LpubNames_start0:
      [...]
      LpubNames_end0:
    }

Without -mattr=+ptx75 ptxas complains about labels and label
expressions:

error   : Feature 'labels1 - labels2 expression in .section' requires
PTX ISA .version 7.5 or later
error   : Feature 'Defining labels in .section' requires PTX ISA
.version 7.0 or later

The patch modifies dbg-value-const-byref.ll to let it run without PTX
7.5 (available from CUDA 11.0), and adds a new test just for this
case.

Differential revision: https://reviews.llvm.org/D124108
llvm/test/DebugInfo/NVPTX/dbg-value-const-byref.ll
llvm/test/DebugInfo/NVPTX/debug-name-table.ll [new file with mode: 0644]