[NVPTX] Set default version of architecture to SM_30, PTX to 6.0.
authorPavel Kopyl <pavelkopyl@gmail.com>
Mon, 9 Jan 2023 14:55:55 +0000 (17:55 +0300)
committerAndrew Savonichev <andrew.savonichev@gmail.com>
Tue, 10 Jan 2023 12:22:40 +0000 (15:22 +0300)
commitd6775052de6b7aaeaef17fdac1c796c2b99a91ee
tree750a8764b809ed28a3d224088ce4d306de6259de
parent482898d9e21995d445745c3157ad95410ae32ee2
[NVPTX] Set default version of architecture to SM_30, PTX to 6.0.

Support of variadic functions triggers an assertion on several tests
from llvm/test/CodeGen/Generic/ if nvptx64-* is specified as a default
triplet:

Support for variadic functions (unsized array parameter) introduced in
PTX ISA version 6.0 and requires target sm_30.

That happens because those tests contain variadic function calls and
default versions of both PTX ISA (3.2) and architecture (sm_20) are
below the minimally required.

There were no observable problems with these tests before adding
support of variadic functions, because nvptx backend just didn't
handle them properly generating invalid PTX code.

Differential Revision: https://reviews.llvm.org/D141054
llvm/lib/Target/NVPTX/NVPTX.td
llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp
llvm/test/CodeGen/NVPTX/nvvm-reflect-arch.ll
llvm/test/CodeGen/NVPTX/nvvm-reflect-ocl.ll
llvm/test/CodeGen/NVPTX/sm-version.ll
llvm/test/CodeGen/NVPTX/surf-tex.py
llvm/test/DebugInfo/NVPTX/dbg-declare-alloca.ll