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