Hi, Justin
PTX version in CUDA 4.0 has changed from 2.2 to 2.3.
I add ptx23 subtarget and update a testcase.
Is that O.K.?
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
-------------- next part --------------
Index: test/CodeGen/PTX/options.ll
==================================================================---
test/CodeGen/PTX/options.ll (revision 130978)
+++ test/CodeGen/PTX/options.ll (working copy)
@@ -1,6 +1,7 @@
; RUN: llc < %s -march=ptx32 -mattr=ptx20 | grep ".version 2.0"
; RUN: llc < %s -march=ptx32 -mattr=ptx21 | grep ".version 2.1"
; RUN: llc < %s -march=ptx32 -mattr=ptx22 | grep ".version 2.2"
+; RUN: llc < %s -march=ptx32 -mattr=ptx23 | grep ".version 2.3"
; RUN: llc < %s -march=ptx32 -mattr=sm10 | grep ".target sm_10"
; RUN: llc < %s -march=ptx32 -mattr=sm13 | grep ".target sm_13"
; RUN: llc < %s -march=ptx32 -mattr=sm20 | grep ".target sm_20"
Index: lib/Target/PTX/PTX.td
==================================================================---
lib/Target/PTX/PTX.td (revision 130978)
+++ lib/Target/PTX/PTX.td (working copy)
@@ -38,6 +38,10 @@
"Use PTX Language Version 2.2",
[FeaturePTX21]>;
+def FeaturePTX23 : SubtargetFeature<"ptx23",
"PTXVersion", "PTX_VERSION_2_3",
+ "Use PTX Language Version 2.3",
+ [FeaturePTX22]>;
+
//===- PTX Shader Model
---------------------------------------------------===//
def FeatureSM10 : SubtargetFeature<"sm10",
"PTXShaderModel", "PTX_SM_1_0",
Index: lib/Target/PTX/PTXSubtarget.h
==================================================================---
lib/Target/PTX/PTXSubtarget.h (revision 130978)
+++ lib/Target/PTX/PTXSubtarget.h (working copy)
@@ -37,7 +37,8 @@
enum PTXVersionEnum {
PTX_VERSION_2_0, /*< PTX Version 2.0 */
PTX_VERSION_2_1, /*< PTX Version 2.1 */
- PTX_VERSION_2_2 /*< PTX Version 2.2 */
+ PTX_VERSION_2_2, /*< PTX Version 2.2 */
+ PTX_VERSION_2_3 /*< PTX Version 2.3 */
};
/// Shader Model supported on the target GPU.
Index: lib/Target/PTX/PTXSubtarget.cpp
==================================================================---
lib/Target/PTX/PTXSubtarget.cpp (revision 130978)
+++ lib/Target/PTX/PTXSubtarget.cpp (working copy)
@@ -41,6 +41,7 @@
case PTX_VERSION_2_0: return "2.0";
case PTX_VERSION_2_1: return "2.1";
case PTX_VERSION_2_2: return "2.2";
+ case PTX_VERSION_2_3: return "2.3";
}
}