[llvm] r233583 - [NVPTX] Associate a minimum PTX version for each SM architecture
Justin Holewinski
jholewinski at nvidia.com
Mon Mar 30 12:30:56 PDT 2015
Author: jholewinski
Date: Mon Mar 30 14:30:55 2015
New Revision: 233583
URL: http://llvm.org/viewvc/llvm-project?rev=233583&view=rev
Log:
[NVPTX] Associate a minimum PTX version for each SM architecture
When a new SM architecture is introduced, it is only supported by the
current PTX version and later. Make sure we are using at least the
minimum PTX version for the target architecture.
This also removes support for PTX ISA < 3.2.
Added:
llvm/trunk/test/CodeGen/NVPTX/sm-version-50.ll
Removed:
llvm/trunk/test/CodeGen/NVPTX/ptx-version-30.ll
llvm/trunk/test/CodeGen/NVPTX/ptx-version-31.ll
Modified:
llvm/trunk/lib/Target/NVPTX/NVPTX.td
llvm/trunk/test/CodeGen/NVPTX/sm-version-30.ll
llvm/trunk/test/CodeGen/NVPTX/sm-version-32.ll
llvm/trunk/test/CodeGen/NVPTX/sm-version-35.ll
llvm/trunk/test/CodeGen/NVPTX/sm-version-37.ll
llvm/trunk/test/CodeGen/NVPTX/sm-version-52.ll
llvm/trunk/test/CodeGen/NVPTX/sm-version-53.ll
Modified: llvm/trunk/lib/Target/NVPTX/NVPTX.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTX.td?rev=233583&r1=233582&r2=233583&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTX.td (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTX.td Mon Mar 30 14:30:55 2015
@@ -46,10 +46,6 @@ def SM53 : SubtargetFeature<"sm_53", "Sm
"Target SM 5.3">;
// PTX Versions
-def PTX30 : SubtargetFeature<"ptx30", "PTXVersion", "30",
- "Use PTX version 3.0">;
-def PTX31 : SubtargetFeature<"ptx31", "PTXVersion", "31",
- "Use PTX version 3.1">;
def PTX32 : SubtargetFeature<"ptx32", "PTXVersion", "32",
"Use PTX version 3.2">;
def PTX40 : SubtargetFeature<"ptx40", "PTXVersion", "40",
@@ -69,12 +65,12 @@ class Proc<string Name, list<SubtargetFe
def : Proc<"sm_20", [SM20]>;
def : Proc<"sm_21", [SM21]>;
def : Proc<"sm_30", [SM30]>;
-def : Proc<"sm_32", [SM32]>;
+def : Proc<"sm_32", [SM32, PTX40]>;
def : Proc<"sm_35", [SM35]>;
-def : Proc<"sm_37", [SM37]>;
-def : Proc<"sm_50", [SM50]>;
-def : Proc<"sm_52", [SM52]>;
-def : Proc<"sm_53", [SM53]>;
+def : Proc<"sm_37", [SM37, PTX41]>;
+def : Proc<"sm_50", [SM50, PTX40]>;
+def : Proc<"sm_52", [SM52, PTX41]>;
+def : Proc<"sm_53", [SM53, PTX42]>;
def NVPTXInstrInfo : InstrInfo {
Removed: llvm/trunk/test/CodeGen/NVPTX/ptx-version-30.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/ptx-version-30.ll?rev=233582&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/ptx-version-30.ll (original)
+++ llvm/trunk/test/CodeGen/NVPTX/ptx-version-30.ll (removed)
@@ -1,6 +0,0 @@
-; RUN: llc < %s -march=nvptx -mcpu=sm_20 -mattr=ptx30 | FileCheck %s
-; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -mattr=ptx30 | FileCheck %s
-
-
-; CHECK: .version 3.0
-
Removed: llvm/trunk/test/CodeGen/NVPTX/ptx-version-31.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/ptx-version-31.ll?rev=233582&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/ptx-version-31.ll (original)
+++ llvm/trunk/test/CodeGen/NVPTX/ptx-version-31.ll (removed)
@@ -1,6 +0,0 @@
-; RUN: llc < %s -march=nvptx -mcpu=sm_20 -mattr=ptx31 | FileCheck %s
-; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -mattr=ptx31 | FileCheck %s
-
-
-; CHECK: .version 3.1
-
Modified: llvm/trunk/test/CodeGen/NVPTX/sm-version-30.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/sm-version-30.ll?rev=233583&r1=233582&r2=233583&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/sm-version-30.ll (original)
+++ llvm/trunk/test/CodeGen/NVPTX/sm-version-30.ll Mon Mar 30 14:30:55 2015
@@ -2,5 +2,6 @@
; RUN: llc < %s -march=nvptx64 -mcpu=sm_30 | FileCheck %s
+; CHECK: .version 3.2
; CHECK: .target sm_30
Modified: llvm/trunk/test/CodeGen/NVPTX/sm-version-32.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/sm-version-32.ll?rev=233583&r1=233582&r2=233583&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/sm-version-32.ll (original)
+++ llvm/trunk/test/CodeGen/NVPTX/sm-version-32.ll Mon Mar 30 14:30:55 2015
@@ -2,5 +2,6 @@
; RUN: llc < %s -march=nvptx64 -mcpu=sm_32 | FileCheck %s
+; CHECK: .version 4.0
; CHECK: .target sm_32
Modified: llvm/trunk/test/CodeGen/NVPTX/sm-version-35.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/sm-version-35.ll?rev=233583&r1=233582&r2=233583&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/sm-version-35.ll (original)
+++ llvm/trunk/test/CodeGen/NVPTX/sm-version-35.ll Mon Mar 30 14:30:55 2015
@@ -2,5 +2,6 @@
; RUN: llc < %s -march=nvptx64 -mcpu=sm_35 | FileCheck %s
+; CHECK: .version 3.2
; CHECK: .target sm_35
Modified: llvm/trunk/test/CodeGen/NVPTX/sm-version-37.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/sm-version-37.ll?rev=233583&r1=233582&r2=233583&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/sm-version-37.ll (original)
+++ llvm/trunk/test/CodeGen/NVPTX/sm-version-37.ll Mon Mar 30 14:30:55 2015
@@ -2,5 +2,6 @@
; RUN: llc < %s -march=nvptx64 -mcpu=sm_37 | FileCheck %s
+; CHECK: .version 4.1
; CHECK: .target sm_37
Added: llvm/trunk/test/CodeGen/NVPTX/sm-version-50.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/sm-version-50.ll?rev=233583&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/sm-version-50.ll (added)
+++ llvm/trunk/test/CodeGen/NVPTX/sm-version-50.ll Mon Mar 30 14:30:55 2015
@@ -0,0 +1,7 @@
+; RUN: llc < %s -march=nvptx -mcpu=sm_50 | FileCheck %s
+; RUN: llc < %s -march=nvptx64 -mcpu=sm_50 | FileCheck %s
+
+
+; CHECK: .version 4.0
+; CHECK: .target sm_50
+
Modified: llvm/trunk/test/CodeGen/NVPTX/sm-version-52.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/sm-version-52.ll?rev=233583&r1=233582&r2=233583&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/sm-version-52.ll (original)
+++ llvm/trunk/test/CodeGen/NVPTX/sm-version-52.ll Mon Mar 30 14:30:55 2015
@@ -2,5 +2,6 @@
; RUN: llc < %s -march=nvptx64 -mcpu=sm_52 | FileCheck %s
+; CHECK: .version 4.1
; CHECK: .target sm_52
Modified: llvm/trunk/test/CodeGen/NVPTX/sm-version-53.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/sm-version-53.ll?rev=233583&r1=233582&r2=233583&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/sm-version-53.ll (original)
+++ llvm/trunk/test/CodeGen/NVPTX/sm-version-53.ll Mon Mar 30 14:30:55 2015
@@ -2,5 +2,6 @@
; RUN: llc < %s -march=nvptx64 -mcpu=sm_53 | FileCheck %s
+; CHECK: .version 4.2
; CHECK: .target sm_53
More information about the llvm-commits
mailing list