[clang][AMDGPU] rename sram-ecc as sramecc
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Mon, 7 Dec 2020 22:31:28 +0000 (17:31 -0500)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Mon, 7 Dec 2020 23:05:47 +0000 (18:05 -0500)
As backend renamed sram-ecc to sramecc, this patch makes
corresponding change in clang.

Differential Revision: https://reviews.llvm.org/D86217

15 files changed:
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Basic/TargetID.h
clang/include/clang/Driver/Options.td
clang/lib/Basic/TargetID.cpp
clang/lib/Basic/Targets/AMDGPU.h
clang/test/Driver/amdgpu-features.c
clang/test/Driver/hip-invalid-target-id.hip
clang/test/Driver/hip-target-id.hip
clang/test/Driver/hip-toolchain-features.hip
clang/test/Driver/invalid-target-id.cl
clang/test/Driver/target-id-macros.cl
clang/test/Driver/target-id-macros.hip
clang/test/Driver/target-id.cl
llvm/include/llvm/Support/TargetParser.h
llvm/lib/Support/TargetParser.cpp

index d6a2609..8fd7a80 100644 (file)
@@ -79,7 +79,7 @@ def err_drv_cuda_host_arch : Error<"unsupported architecture '%0' for host compi
 def err_drv_mix_cuda_hip : Error<"Mixed Cuda and HIP compilation is not supported.">;
 def err_drv_bad_target_id : Error<"Invalid target ID: %0 (A target ID is a processor name "
   "followed by an optional list of predefined features post-fixed by a plus or minus sign deliminated "
-  "by colon, e.g. 'gfx908:sram-ecc+:xnack-')">;
+  "by colon, e.g. 'gfx908:sramecc+:xnack-')">;
 def err_drv_bad_offload_arch_combo : Error<"Invalid offload arch combinations: %0 and %1 (For a specific "
   "processor, a feature should either exist in all offload archs, or not exist in any offload archs)">;
 def err_drv_invalid_thread_model_for_target : Error<
index 95fd61d..1a97855 100644 (file)
@@ -19,7 +19,7 @@ namespace clang {
 /// Get all feature strings that can be used in target ID for \p Processor.
 /// Target ID is a processor name with optional feature strings
 /// postfixed by a plus or minus sign delimited by colons, e.g.
-/// gfx908:xnack+:sram-ecc-. Each processor have a limited
+/// gfx908:xnack+:sramecc-. Each processor have a limited
 /// number of predefined features when showing up in a target ID.
 const llvm::SmallVector<llvm::StringRef, 4>
 getAllPossibleTargetIDFeatures(const llvm::Triple &T,
index 6480d6e..3473490 100644 (file)
@@ -666,7 +666,7 @@ def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[NoXa
 def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>,
   HelpText<"CUDA offloading device architecture (e.g. sm_35), or HIP offloading target ID in the form of a "
            "device architecture followed by target ID features delimited by a colon. Each target ID feature "
-           "is a pre-defined string followed by a plus or minus sign (e.g. gfx908:xnack+:sram-ecc-).  May be "
+           "is a pre-defined string followed by a plus or minus sign (e.g. gfx908:xnack+:sramecc-).  May be "
            "specified more than once.">;
 def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[NoXarchOption]>,
   Alias<offload_arch_EQ>;
@@ -2568,9 +2568,9 @@ def mcumode : Flag<["-"], "mcumode">, Group<m_amdgpu_Features_Group>,
   HelpText<"Specify CU (-mcumode) or WGP (-mno-cumode) wavefront execution mode (AMDGPU only)">;
 def mno_cumode : Flag<["-"], "mno-cumode">, Group<m_amdgpu_Features_Group>;
 
-def msram_ecc : Flag<["-"], "msram-ecc">, Group<m_amdgpu_Features_Group>,
+def msramecc : Flag<["-"], "msramecc">, Group<m_amdgpu_Features_Group>,
   HelpText<"Specify SRAM ECC mode (AMDGPU only)">;
-def mno_sram_ecc : Flag<["-"], "mno-sram-ecc">, Group<m_amdgpu_Features_Group>;
+def mno_sramecc : Flag<["-"], "mno-sramecc">, Group<m_amdgpu_Features_Group>;
 
 def mwavefrontsize64 : Flag<["-"], "mwavefrontsize64">, Group<m_Group>,
   HelpText<"Specify wavefront size 64 mode (AMDGPU only)">;
index 3bb895f..59d416f 100644 (file)
@@ -26,8 +26,8 @@ getAllPossibleAMDGPUTargetIDFeatures(const llvm::Triple &T,
     return Ret;
   auto Features = T.isAMDGCN() ? llvm::AMDGPU::getArchAttrAMDGCN(ProcKind)
                                : llvm::AMDGPU::getArchAttrR600(ProcKind);
-  if (Features & llvm::AMDGPU::FEATURE_SRAM_ECC)
-    Ret.push_back("sram-ecc");
+  if (Features & llvm::AMDGPU::FEATURE_SRAMECC)
+    Ret.push_back("sramecc");
   if (Features & llvm::AMDGPU::FEATURE_XNACK)
     Ret.push_back("xnack");
   return Ret;
@@ -61,7 +61,7 @@ llvm::StringRef getProcessorFromTargetID(const llvm::Triple &T,
 //
 // A target ID is a processor name followed by a list of target features
 // delimited by colon. Each target feature is a string post-fixed by a plus
-// or minus sign, e.g. gfx908:sram-ecc+:xnack-.
+// or minus sign, e.g. gfx908:sramecc+:xnack-.
 static llvm::Optional<llvm::StringRef>
 parseTargetIDWithFormatCheckingOnly(llvm::StringRef TargetID,
                                     llvm::StringMap<bool> *FeatureMap) {
index 2158a8d..8b3f30e 100644 (file)
@@ -44,7 +44,7 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo {
   unsigned WavefrontSize;
 
   /// Target ID is device name followed by optional feature name postfixed
-  /// by plus or minus sign delimitted by colon, e.g. gfx908:xnack+:sram-ecc-.
+  /// by plus or minus sign delimitted by colon, e.g. gfx908:xnack+:sramecc-.
   /// If the target ID contains feature+, map it to true.
   /// If the target ID contains feature-, map it to false.
   /// If the target ID does not contain a feature (default), do not map it.
index a685870..aa71a70 100644 (file)
 // RUN: %clang -### -target amdgcn-amdpal -mcpu=gfx900:xnack- %s 2>&1 | FileCheck --check-prefix=NO-XNACK %s
 // NO-XNACK: "-target-feature" "-xnack"
 
-// RUN: %clang -### -target amdgcn-mesa3d -mcpu=gfx908:sram-ecc+ %s 2>&1 | FileCheck --check-prefix=SRAM-ECC %s
-// SRAM-ECC: "-target-feature" "+sram-ecc"
+// RUN: %clang -### -target amdgcn-mesa3d -mcpu=gfx908:sramecc+ %s 2>&1 | FileCheck --check-prefix=SRAM-ECC %s
+// SRAM-ECC: "-target-feature" "+sramecc"
 
-// RUN: %clang -### -target amdgcn-amdhsa -mcpu=gfx908:sram-ecc- %s 2>&1 | FileCheck --check-prefix=NO-SRAM-ECC %s
-// NO-SRAM-ECC: "-target-feature" "-sram-ecc"
+// RUN: %clang -### -target amdgcn-amdhsa -mcpu=gfx908:sramecc- %s 2>&1 | FileCheck --check-prefix=NO-SRAM-ECC %s
+// NO-SRAM-ECC: "-target-feature" "-sramecc"
 
 // RUN: %clang -### -target amdgcn-amdpal -mcpu=gfx1010 -mwavefrontsize64 %s 2>&1 | FileCheck --check-prefix=WAVE64 %s
 // RUN: %clang -### -target amdgcn-amdpal -mcpu=gfx1010 -mno-wavefrontsize64 -mwavefrontsize64 %s 2>&1 | FileCheck --check-prefix=WAVE64 %s
index cbd6f59..7514998 100644 (file)
@@ -21,7 +21,7 @@
 // RUN: not %clang -### -target x86_64-linux-gnu \
 // RUN:   -x hip --offload-arch=gfx908 \
 // RUN:   --offload-arch=gfx908:unknown+ \
-// RUN:   --offload-arch=gfx908+sram-ecc+unknown \
+// RUN:   --offload-arch=gfx908+sramecc+unknown \
 // RUN:   --offload-arch=gfx900+xnack \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %s 2>&1 | FileCheck -check-prefix=UNK %s
 
 // RUN: not %clang -### -target x86_64-linux-gnu \
 // RUN:   -x hip --offload-arch=gfx908 \
-// RUN:   --offload-arch=gfx908:sram-ecc+:unknown+ \
+// RUN:   --offload-arch=gfx908:sramecc+:unknown+ \
 // RUN:   --offload-arch=gfx900+xnack \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %s 2>&1 | FileCheck -check-prefix=MIXED %s
 
-// MIXED: error: Invalid target ID: gfx908:sram-ecc+:unknown+
+// MIXED: error: Invalid target ID: gfx908:sramecc+:unknown+
 
 // RUN: not %clang -### -target x86_64-linux-gnu \
 // RUN:   -x hip --offload-arch=gfx908 \
-// RUN:   --offload-arch=gfx900:sram-ecc+ \
+// RUN:   --offload-arch=gfx900:sramecc+ \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %s 2>&1 | FileCheck -check-prefix=UNSUP %s
 
-// UNSUP: error: Invalid target ID: gfx900:sram-ecc+
+// UNSUP: error: Invalid target ID: gfx900:sramecc+
 
 / RUN: not %clang -### -target x86_64-linux-gnu \
 // RUN:   -x hip --offload-arch=gfx908 \
index c4a5c5c..073f01c 100644 (file)
@@ -4,50 +4,50 @@
 
 // RUN: %clang -### -target x86_64-linux-gnu \
 // RUN:   -x hip \
-// RUN:   --offload-arch=gfx908:xnack+:sram-ecc+ \
-// RUN:   --offload-arch=gfx908:xnack+:sram-ecc- \
+// RUN:   --offload-arch=gfx908:xnack+:sramecc+ \
+// RUN:   --offload-arch=gfx908:xnack+:sramecc- \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %s 2>&1 | FileCheck %s
 
 // RUN: %clang -### -target x86_64-linux-gnu \
 // RUN:   -x hip \
-// RUN:   --offload-arch=gfx908:xnack+:sram-ecc+ \
-// RUN:   --offload-arch=gfx908:xnack+:sram-ecc- \
+// RUN:   --offload-arch=gfx908:xnack+:sramecc+ \
+// RUN:   --offload-arch=gfx908:xnack+:sramecc- \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   -save-temps \
 // RUN:   %s 2>&1 | FileCheck --check-prefixes=CHECK,TMP %s
 
 // RUN: %clang -### -target x86_64-linux-gnu \
 // RUN:   -x hip \
-// RUN:   --offload-arch=gfx908:xnack+:sram-ecc+ \
-// RUN:   --offload-arch=gfx908:xnack+:sram-ecc- \
+// RUN:   --offload-arch=gfx908:xnack+:sramecc+ \
+// RUN:   --offload-arch=gfx908:xnack+:sramecc- \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   -fgpu-rdc \
 // RUN:   %s 2>&1 | FileCheck --check-prefixes=CHECK %s
 
 // CHECK: [[CLANG:"[^"]*clang[^"]*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa"
 // CHECK-SAME: "-target-cpu" "gfx908"
-// CHECK-SAME: "-target-feature" "+sram-ecc"
+// CHECK-SAME: "-target-feature" "+sramecc"
 // CHECK-SAME: "-target-feature" "+xnack"
 
 // TMP: [[CLANG:"[^"]*clang[^"]*"]] "-cc1as" "-triple" "amdgcn-amd-amdhsa"
 // TMP-SAME: "-target-cpu" "gfx908"
-// TMP-SAME: "-target-feature" "+sram-ecc"
+// TMP-SAME: "-target-feature" "+sramecc"
 // TMP-SAME: "-target-feature" "+xnack"
 
 // CHECK: [[LLD:"[^"]*lld[^"]*"]] {{.*}} "-plugin-opt=mcpu=gfx908"
-// CHECK-SAME: "-plugin-opt=-mattr=+sram-ecc,+xnack"
+// CHECK-SAME: "-plugin-opt=-mattr=+sramecc,+xnack"
 
 // CHECK: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa"
 // CHECK-SAME: "-target-cpu" "gfx908"
-// CHECK-SAME: "-target-feature" "-sram-ecc"
+// CHECK-SAME: "-target-feature" "-sramecc"
 // CHECK-SAME: "-target-feature" "+xnack"
 
 // CHECK: [[LLD]] {{.*}} "-plugin-opt=mcpu=gfx908"
-// CHECK-SAME: "-plugin-opt=-mattr=-sram-ecc,+xnack"
+// CHECK-SAME: "-plugin-opt=-mattr=-sramecc,+xnack"
 
 // CHECK: {{"[^"]*clang-offload-bundler[^"]*"}}
-// CHECK-SAME: "-targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa-gfx908:sram-ecc+:xnack+,hip-amdgcn-amd-amdhsa-gfx908:sram-ecc-:xnack+"
+// CHECK-SAME: "-targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa-gfx908:sramecc+:xnack+,hip-amdgcn-amd-amdhsa-gfx908:sramecc-:xnack+"
 
 // Check canonicalization and repeating of target ID.
 
@@ -64,9 +64,9 @@
 // RUN:   -x hip \
 // RUN:   --offload-arch=gfx900:xnack- \
 // RUN:   --offload-arch=gfx900:xnack+ \
-// RUN:   --offload-arch=gfx908:sram-ecc+ \
-// RUN:   --offload-arch=gfx908:sram-ecc- \
+// RUN:   --offload-arch=gfx908:sramecc+ \
+// RUN:   --offload-arch=gfx908:sramecc- \
 // RUN:   --offload-arch=gfx906 \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %s 2>&1 | FileCheck -check-prefix=MULTI %s
-// MULTI: "-targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa-gfx900:xnack+,hip-amdgcn-amd-amdhsa-gfx900:xnack-,hip-amdgcn-amd-amdhsa-gfx906,hip-amdgcn-amd-amdhsa-gfx908:sram-ecc+,hip-amdgcn-amd-amdhsa-gfx908:sram-ecc-"
+// MULTI: "-targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa-gfx900:xnack+,hip-amdgcn-amd-amdhsa-gfx900:xnack-,hip-amdgcn-amd-amdhsa-gfx906,hip-amdgcn-amd-amdhsa-gfx908:sramecc+,hip-amdgcn-amd-amdhsa-gfx908:sramecc-"
index d6617ef..13da70f 100644 (file)
 // NOXNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-xnack"
 
 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
-// RUN:   --cuda-gpu-arch=gfx908:sram-ecc+ %s \
+// RUN:   --cuda-gpu-arch=gfx908:sramecc+ %s \
 // RUN:   2>&1 | FileCheck %s -check-prefix=SRAM
 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
-// RUN:   --cuda-gpu-arch=gfx908:sram-ecc- %s \
+// RUN:   --cuda-gpu-arch=gfx908:sramecc- %s \
 // RUN:   2>&1 | FileCheck %s -check-prefix=NOSRAM
 
-// SRAM: {{.*}}clang{{.*}}"-target-feature" "+sram-ecc"
-// NOSRAM: {{.*}}clang{{.*}}"-target-feature" "-sram-ecc"
-// SRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+sram-ecc"
-// NOTSRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-sram-ecc"
+// SRAM: {{.*}}clang{{.*}}"-target-feature" "+sramecc"
+// NOSRAM: {{.*}}clang{{.*}}"-target-feature" "-sramecc"
+// SRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+sramecc"
+// NOTSRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-sramecc"
 
 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
 // RUN:   --cuda-gpu-arch=gfx1010 %s \
 // NOTCUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-cumode"
 
 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
-// RUN:   --cuda-gpu-arch=gfx908:xnack+:sram-ecc+ %s \
+// RUN:   --cuda-gpu-arch=gfx908:xnack+:sramecc+ %s \
 // RUN:   2>&1 | FileCheck %s -check-prefix=ALL3
 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
-// RUN:   --cuda-gpu-arch=gfx908:xnack-:sram-ecc- %s \
+// RUN:   --cuda-gpu-arch=gfx908:xnack-:sramecc- %s \
 // RUN:   2>&1 | FileCheck %s -check-prefix=NOALL3
 
-// ALL3: {{.*}}clang{{.*}}"-target-feature" "+sram-ecc" "-target-feature" "+xnack"
-// NOALL3: {{.*}}clang{{.*}}"-target-feature" "-sram-ecc" "-target-feature" "-xnack"
+// ALL3: {{.*}}clang{{.*}}"-target-feature" "+sramecc" "-target-feature" "+xnack"
+// NOALL3: {{.*}}clang{{.*}}"-target-feature" "-sramecc" "-target-feature" "-xnack"
 
 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
 // RUN:   --cuda-gpu-arch=gfx1010 %s \
index e20f097..a78a6e0 100644 (file)
 // UNK: error: Invalid target ID: gfx908:unknown+
 
 // RUN: not %clang -target amdgcn-amd-amdhsa \
-// RUN:   -mcpu=gfx908:sram-ecc+:unknown+ -nostdlib \
+// RUN:   -mcpu=gfx908:sramecc+:unknown+ -nostdlib \
 // RUN:   %s 2>&1 | FileCheck -check-prefix=MIXED %s
 
-// MIXED: error: Invalid target ID: gfx908:sram-ecc+:unknown+
+// MIXED: error: Invalid target ID: gfx908:sramecc+:unknown+
 
 // RUN: not %clang -target amdgcn-amd-amdhsa \
-// RUN:   -mcpu=gfx900:sram-ecc+ -nostdlib \
+// RUN:   -mcpu=gfx900:sramecc+ -nostdlib \
 // RUN:   %s 2>&1 | FileCheck -check-prefix=UNSUP %s
 
-// UNSUP: error: Invalid target ID: gfx900:sram-ecc+
+// UNSUP: error: Invalid target ID: gfx900:sramecc+
 
 // RUN: not %clang -target amdgcn-amd-amdhsa \
 // RUN:   -mcpu=gfx900:xnack -nostdlib \
index d440ca2..9b00b72 100644 (file)
@@ -3,15 +3,15 @@
 // REQUIRES: amdgpu-registered-target
 
 // RUN: %clang -E -dM -target amdgcn-amd-amdhsa \
-// RUN:   -mcpu=gfx908:xnack+:sram-ecc- -nogpulib -o - %s 2>&1 \
+// RUN:   -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \
 // RUN:   | FileCheck -check-prefixes=PROC,ID1 %s
 
 // RUN: %clang -E -dM -target amdgcn-amd-amdpal \
-// RUN:   -mcpu=gfx908:xnack+:sram-ecc- -nogpulib -o - %s 2>&1 \
+// RUN:   -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \
 // RUN:   | FileCheck -check-prefixes=PROC,ID1 %s
 
 // RUN: %clang -E -dM -target amdgcn--mesa3d \
-// RUN:   -mcpu=gfx908:xnack+:sram-ecc- -nogpulib -o - %s 2>&1 \
+// RUN:   -mcpu=gfx908:xnack+:sramecc- -nogpulib -o - %s 2>&1 \
 // RUN:   | FileCheck -check-prefixes=PROC,ID1 %s
 
 // RUN: %clang -E -dM -target amdgcn-amd-amdhsa \
 // PROC-DAG: #define __amdgcn_processor__ "gfx908"
 
 // ID1-DAG: #define __amdgcn_feature_xnack__ 1
-// ID1-DAG: #define __amdgcn_feature_sram_ecc__ 0
-// ID1-DAG: #define __amdgcn_target_id__ "gfx908:sram-ecc-:xnack+"
+// ID1-DAG: #define __amdgcn_feature_sramecc__ 0
+// ID1-DAG: #define __amdgcn_target_id__ "gfx908:sramecc-:xnack+"
 
 // ID2-DAG: #define __amdgcn_target_id__ "gfx908"
 // ID2-NOT: #define __amdgcn_feature_xnack__
-// ID2-NOT: #define __amdgcn_feature_sram_ecc__
+// ID2-NOT: #define __amdgcn_feature_sramecc__
 
 // NONE-NOT: #define __amdgcn_processor__
 // NONE-NOT: #define __amdgcn_feature_xnack__
-// NONE-NOT: #define __amdgcn_feature_sram_ecc__
+// NONE-NOT: #define __amdgcn_feature_sramecc__
 // NONE-NOT: #define __amdgcn_target_id__
index fdb9733..c345450 100644 (file)
@@ -3,10 +3,10 @@
 // REQUIRES: amdgpu-registered-target
 
 // RUN: %clang -E -dM -target x86_64-linux-gnu --cuda-device-only \
-// RUN:   --offload-arch=gfx908:xnack+:sram-ecc- -nogpuinc -nogpulib \
+// RUN:   --offload-arch=gfx908:xnack+:sramecc- -nogpuinc -nogpulib \
 // RUN:   -o - %s 2>&1 | FileCheck %s
 
 // CHECK-DAG: #define __amdgcn_processor__ "gfx908"
 // CHECK-DAG: #define __amdgcn_feature_xnack__ 1
-// CHECK-DAG: #define __amdgcn_feature_sram_ecc__ 0
-// CHECK-DAG: #define __amdgcn_target_id__ "gfx908:sram-ecc-:xnack+"
+// CHECK-DAG: #define __amdgcn_feature_sramecc__ 0
+// CHECK-DAG: #define __amdgcn_target_id__ "gfx908:sramecc-:xnack+"
index 114ad98..b9b5aab 100644 (file)
@@ -3,30 +3,30 @@
 // REQUIRES: amdgpu-registered-target
 
 // RUN: %clang -### -target amdgcn-amd-amdhsa \
-// RUN:   -mcpu=gfx908:xnack+:sram-ecc- \
+// RUN:   -mcpu=gfx908:xnack+:sramecc- \
 // RUN:   -nostdlib %s 2>&1 | FileCheck %s
 
 // RUN: %clang -### -target amdgcn-amd-amdhsa \
-// RUN:   -mcpu=gfx908:xnack+:sram-ecc- \
+// RUN:   -mcpu=gfx908:xnack+:sramecc- \
 // RUN:   -nostdlib -x ir %s 2>&1 | FileCheck %s
 
 // RUN: %clang -### -target amdgcn-amd-amdhsa \
-// RUN:   -mcpu=gfx908:xnack+:sram-ecc- \
+// RUN:   -mcpu=gfx908:xnack+:sramecc- \
 // RUN:   -nostdlib -x assembler %s 2>&1 | FileCheck %s
 
 // RUN: %clang -### -target amdgcn-amd-amdpal \
-// RUN:   -mcpu=gfx908:xnack+:sram-ecc- \
+// RUN:   -mcpu=gfx908:xnack+:sramecc- \
 // RUN:   -nostdlib %s 2>&1 | FileCheck %s
 
 // RUN: %clang -### -target amdgcn--mesa3d \
-// RUN:   -mcpu=gfx908:xnack+:sram-ecc- \
+// RUN:   -mcpu=gfx908:xnack+:sramecc- \
 // RUN:   -nostdlib %s 2>&1 | FileCheck %s
 
 // RUN: %clang -### -target amdgcn-amd-amdhsa \
 // RUN:   -nostdlib %s 2>&1 | FileCheck -check-prefix=NONE %s
 
 // CHECK: "-target-cpu" "gfx908"
-// CHECK-SAME: "-target-feature" "-sram-ecc"
+// CHECK-SAME: "-target-feature" "-sramecc"
 // CHECK-SAME: "-target-feature" "+xnack"
 
 // NONE-NOT: "-target-cpu"
index 1d82dd8..450e713 100644 (file)
@@ -125,7 +125,7 @@ enum ArchFeatureKind : uint32_t {
   FEATURE_XNACK = 1 << 7,
 
   // Sram-ecc is available.
-  FEATURE_SRAM_ECC = 1 << 8,
+  FEATURE_SRAMECC = 1 << 8,
 };
 
 StringRef getArchNameAMDGCN(GPUKind AK);
index b58fadf..9c737f1 100644 (file)
@@ -101,8 +101,8 @@ constexpr GPUInfo AMDGCNGPUs[] = {
   {{"gfx900"},    {"gfx900"},  GK_GFX900,  FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
   {{"gfx902"},    {"gfx902"},  GK_GFX902,  FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
   {{"gfx904"},    {"gfx904"},  GK_GFX904,  FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
-  {{"gfx906"},    {"gfx906"},  GK_GFX906,  FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK|FEATURE_SRAM_ECC},
-  {{"gfx908"},    {"gfx908"},  GK_GFX908,  FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK|FEATURE_SRAM_ECC},
+  {{"gfx906"},    {"gfx906"},  GK_GFX906,  FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK|FEATURE_SRAMECC},
+  {{"gfx908"},    {"gfx908"},  GK_GFX908,  FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK|FEATURE_SRAMECC},
   {{"gfx909"},    {"gfx909"},  GK_GFX909,  FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
   {{"gfx90c"},    {"gfx90c"},  GK_GFX90C,  FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
   {{"gfx1010"},   {"gfx1010"}, GK_GFX1010, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32|FEATURE_XNACK},