1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[NVPTX] Add options for PTX 4.1/4.2 and SM 3.2/3.7/5.2/5.3

llvm-svn: 233575
This commit is contained in:
Justin Holewinski 2015-03-30 18:12:50 +00:00
parent e7050b7a2b
commit 6aa64a7e42
5 changed files with 40 additions and 0 deletions

View File

@ -32,10 +32,18 @@ def SM21 : SubtargetFeature<"sm_21", "SmVersion", "21",
"Target SM 2.1">;
def SM30 : SubtargetFeature<"sm_30", "SmVersion", "30",
"Target SM 3.0">;
def SM32 : SubtargetFeature<"sm_32", "SmVersion", "32",
"Target SM 3.2">;
def SM35 : SubtargetFeature<"sm_35", "SmVersion", "35",
"Target SM 3.5">;
def SM37 : SubtargetFeature<"sm_37", "SmVersion", "37",
"Target SM 3.7">;
def SM50 : SubtargetFeature<"sm_50", "SmVersion", "50",
"Target SM 5.0">;
def SM52 : SubtargetFeature<"sm_52", "SmVersion", "52",
"Target SM 5.2">;
def SM53 : SubtargetFeature<"sm_53", "SmVersion", "53",
"Target SM 5.3">;
// PTX Versions
def PTX30 : SubtargetFeature<"ptx30", "PTXVersion", "30",
@ -46,6 +54,10 @@ def PTX32 : SubtargetFeature<"ptx32", "PTXVersion", "32",
"Use PTX version 3.2">;
def PTX40 : SubtargetFeature<"ptx40", "PTXVersion", "40",
"Use PTX version 4.0">;
def PTX41 : SubtargetFeature<"ptx41", "PTXVersion", "41",
"Use PTX version 4.1">;
def PTX42 : SubtargetFeature<"ptx42", "PTXVersion", "42",
"Use PTX version 4.2">;
//===----------------------------------------------------------------------===//
// NVPTX supported processors.
@ -57,8 +69,12 @@ class Proc<string Name, list<SubtargetFeature> Features>
def : Proc<"sm_20", [SM20]>;
def : Proc<"sm_21", [SM21]>;
def : Proc<"sm_30", [SM30]>;
def : Proc<"sm_32", [SM32]>;
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 NVPTXInstrInfo : InstrInfo {

View File

@ -0,0 +1,6 @@
; RUN: llc < %s -march=nvptx -mcpu=sm_32 | FileCheck %s
; RUN: llc < %s -march=nvptx64 -mcpu=sm_32 | FileCheck %s
; CHECK: .target sm_32

View File

@ -0,0 +1,6 @@
; RUN: llc < %s -march=nvptx -mcpu=sm_37 | FileCheck %s
; RUN: llc < %s -march=nvptx64 -mcpu=sm_37 | FileCheck %s
; CHECK: .target sm_37

View File

@ -0,0 +1,6 @@
; RUN: llc < %s -march=nvptx -mcpu=sm_52 | FileCheck %s
; RUN: llc < %s -march=nvptx64 -mcpu=sm_52 | FileCheck %s
; CHECK: .target sm_52

View File

@ -0,0 +1,6 @@
; RUN: llc < %s -march=nvptx -mcpu=sm_53 | FileCheck %s
; RUN: llc < %s -march=nvptx64 -mcpu=sm_53 | FileCheck %s
; CHECK: .target sm_53