forked from OSchip/llvm-project
[AMDGPU] gfx1011/gfx1012 clang support
Differential Revision: https://reviews.llvm.org/D63308 llvm-svn: 363345
This commit is contained in:
parent
c43e67bfff
commit
cafccd7a53
|
@ -135,6 +135,13 @@ bool AMDGPUTargetInfo::initFeatureMap(
|
|||
CPU = "gfx600";
|
||||
|
||||
switch (llvm::AMDGPU::parseArchAMDGCN(CPU)) {
|
||||
case GK_GFX1012:
|
||||
case GK_GFX1011:
|
||||
Features["dot1-insts"] = true;
|
||||
Features["dot2-insts"] = true;
|
||||
Features["dot5-insts"] = true;
|
||||
Features["dot6-insts"] = true;
|
||||
LLVM_FALLTHROUGH;
|
||||
case GK_GFX1010:
|
||||
Features["dl-insts"] = true;
|
||||
Features["16-bit-insts"] = true;
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx904 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX904 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx906 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX906 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1010 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1010 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1011 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1011 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1012 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1012 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx801 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX801 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx700 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX700 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx600 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX600 %s
|
||||
|
@ -14,6 +16,8 @@
|
|||
// GFX904: "target-features"="+16-bit-insts,+ci-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx8-insts,+gfx9-insts,+s-memrealtime"
|
||||
// GFX906: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx8-insts,+gfx9-insts,+s-memrealtime"
|
||||
// GFX1010: "target-features"="+16-bit-insts,+dl-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx10-insts,+gfx9-insts,+s-memrealtime"
|
||||
// GFX1011: "target-features"="+16-bit-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx10-insts,+gfx9-insts,+s-memrealtime"
|
||||
// GFX1012: "target-features"="+16-bit-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx10-insts,+gfx9-insts,+s-memrealtime"
|
||||
// GFX801: "target-features"="+16-bit-insts,+ci-insts,+dpp,+fp32-denormals,+fp64-fp16-denormals,+gfx8-insts,+s-memrealtime"
|
||||
// GFX700: "target-features"="+ci-insts,+fp64-fp16-denormals,-fp32-denormals"
|
||||
// GFX600: "target-features"="+fp64-fp16-denormals,-fp32-denormals"
|
||||
|
|
|
@ -177,6 +177,8 @@
|
|||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx906 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX906 %s
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx909 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX909 %s
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX1010 %s
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1011 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX1011 %s
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1012 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX1012 %s
|
||||
|
||||
// GFX600-DAG: #define FP_FAST_FMA 1
|
||||
// GFX601-DAG: #define FP_FAST_FMA 1
|
||||
|
@ -195,6 +197,8 @@
|
|||
// GFX906-DAG: #define FP_FAST_FMA 1
|
||||
// GFX909-DAG: #define FP_FAST_FMA 1
|
||||
// GFX1010-DAG: #define FP_FAST_FMA 1
|
||||
// GFX1011-DAG: #define FP_FAST_FMA 1
|
||||
// GFX1012-DAG: #define FP_FAST_FMA 1
|
||||
|
||||
// GFX600-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX601-NOT: #define FP_FAST_FMAF 1
|
||||
|
@ -213,6 +217,8 @@
|
|||
// GFX906-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX909-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX1010-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX1011-DAG: #define FP_FAST_FMAF 1
|
||||
// GFX1012-DAG: #define FP_FAST_FMAF 1
|
||||
|
||||
// ARCH-GCN-DAG: #define __AMDGCN__ 1
|
||||
// ARCH-GCN-DAG: #define __AMDGPU__ 1
|
||||
|
@ -235,6 +241,8 @@
|
|||
// GFX906-DAG: #define __HAS_FMAF__ 1
|
||||
// GFX909-DAG: #define __HAS_FMAF__ 1
|
||||
// GFX1010-DAG: #define __HAS_FMAF__ 1
|
||||
// GFX1011-DAG: #define __HAS_FMAF__ 1
|
||||
// GFX1012-DAG: #define __HAS_FMAF__ 1
|
||||
|
||||
// GFX600-DAG: #define __HAS_FP64__ 1
|
||||
// GFX601-DAG: #define __HAS_FP64__ 1
|
||||
|
@ -253,6 +261,8 @@
|
|||
// GFX906-DAG: #define __HAS_FP64__ 1
|
||||
// GFX909-DAG: #define __HAS_FP64__ 1
|
||||
// GFX1010-DAG: #define __HAS_FP64__ 1
|
||||
// GFX1011-DAG: #define __HAS_FP64__ 1
|
||||
// GFX1012-DAG: #define __HAS_FP64__ 1
|
||||
|
||||
// GFX600-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX601-DAG: #define __HAS_LDEXPF__ 1
|
||||
|
@ -271,6 +281,8 @@
|
|||
// GFX906-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX909-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX1010-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX1011-DAG: #define __HAS_LDEXPF__ 1
|
||||
// GFX1012-DAG: #define __HAS_LDEXPF__ 1
|
||||
|
||||
// GFX600-DAG: #define __gfx600__ 1
|
||||
// GFX601-DAG: #define __gfx601__ 1
|
||||
|
@ -289,3 +301,5 @@
|
|||
// GFX906-DAG: #define __gfx906__ 1
|
||||
// GFX909-DAG: #define __gfx909__ 1
|
||||
// GFX1010-DAG: #define __gfx1010__ 1
|
||||
// GFX1011-DAG: #define __gfx1011__ 1
|
||||
// GFX1012-DAG: #define __gfx1012__ 1
|
||||
|
|
|
@ -86,6 +86,8 @@
|
|||
// RUN: %clang -### -target amdgcn -mcpu=gfx906 %s 2>&1 | FileCheck --check-prefix=GFX906 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx909 %s 2>&1 | FileCheck --check-prefix=GFX909 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck --check-prefix=GFX1010 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx1011 %s 2>&1 | FileCheck --check-prefix=GFX1011 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx1012 %s 2>&1 | FileCheck --check-prefix=GFX1012 %s
|
||||
|
||||
// GFX600: "-target-cpu" "gfx600"
|
||||
// TAHITI: "-target-cpu" "tahiti"
|
||||
|
@ -121,3 +123,5 @@
|
|||
// GFX906: "-target-cpu" "gfx906"
|
||||
// GFX909: "-target-cpu" "gfx909"
|
||||
// GFX1010: "-target-cpu" "gfx1010"
|
||||
// GFX1011: "-target-cpu" "gfx1011"
|
||||
// GFX1012: "-target-cpu" "gfx1012"
|
||||
|
|
Loading…
Reference in New Issue