[flang-commits] [flang] 5ac2260 - [Flang][AMDGPU] Change default AMDHSA Code Object version to 5 (#87464)

via flang-commits flang-commits at lists.llvm.org
Wed Apr 3 06:15:06 PDT 2024


Author: Dominik Adamski
Date: 2024-04-03T15:15:02+02:00
New Revision: 5ac22600ed7caf907b740932fac191778d67a9d0

URL: https://github.com/llvm/llvm-project/commit/5ac22600ed7caf907b740932fac191778d67a9d0
DIFF: https://github.com/llvm/llvm-project/commit/5ac22600ed7caf907b740932fac191778d67a9d0.diff

LOG: [Flang][AMDGPU] Change default AMDHSA Code Object version to 5 (#87464)

This is a follow-up of PR:
https://github.com/llvm/llvm-project/pull/79038

Added: 
    

Modified: 
    flang/include/flang/Frontend/CodeGenOptions.h
    flang/test/Lower/AMD/code-object-version.f90

Removed: 
    


################################################################################
diff  --git a/flang/include/flang/Frontend/CodeGenOptions.h b/flang/include/flang/Frontend/CodeGenOptions.h
index b0bbace82c0493..918192abae7243 100644
--- a/flang/include/flang/Frontend/CodeGenOptions.h
+++ b/flang/include/flang/Frontend/CodeGenOptions.h
@@ -87,7 +87,7 @@ class CodeGenOptions : public CodeGenOptionsBase {
 
   /// \brief Code object version for AMDGPU.
   llvm::CodeObjectVersionKind CodeObjectVersion =
-      llvm::CodeObjectVersionKind::COV_4;
+      llvm::CodeObjectVersionKind::COV_5;
 
   /// Optimization remark with an optional regular expression pattern.
   struct OptRemark {

diff  --git a/flang/test/Lower/AMD/code-object-version.f90 b/flang/test/Lower/AMD/code-object-version.f90
index 455f4547252829..4380734d3d1a5f 100644
--- a/flang/test/Lower/AMD/code-object-version.f90
+++ b/flang/test/Lower/AMD/code-object-version.f90
@@ -5,8 +5,8 @@
 !RUN: %flang_fc1 -emit-hlfir -triple amdgcn-amd-amdhsa -target-cpu gfx908 -mcode-object-version=5 %s -o - | FileCheck  --check-prefix=COV_5 %s
 !RUN: %flang_fc1 -emit-hlfir -triple amdgcn-amd-amdhsa -target-cpu gfx908 -mcode-object-version=6 %s -o - | FileCheck  --check-prefix=COV_6 %s
 
-!COV_DEFAULT: llvm.mlir.global weak_odr hidden local_unnamed_addr constant @__oclc_ABI_version(400 : i32) {addr_space = 4 : i32} : i32
-!COV_NONE-NOT: llvm.mlir.global weak_odr hidden local_unnamed_addr constant @__oclc_ABI_version(400 : i32) {addr_space = 4 : i32} : i32
+!COV_DEFAULT: llvm.mlir.global weak_odr hidden local_unnamed_addr constant @__oclc_ABI_version(500 : i32) {addr_space = 4 : i32} : i32
+!COV_NONE-NOT: llvm.mlir.global weak_odr hidden local_unnamed_addr constant @__oclc_ABI_version(500 : i32) {addr_space = 4 : i32} : i32
 !COV_4: llvm.mlir.global weak_odr hidden local_unnamed_addr constant @__oclc_ABI_version(400 : i32) {addr_space = 4 : i32} : i32
 !COV_5: llvm.mlir.global weak_odr hidden local_unnamed_addr constant @__oclc_ABI_version(500 : i32) {addr_space = 4 : i32} : i32
 !COV_6: llvm.mlir.global weak_odr hidden local_unnamed_addr constant @__oclc_ABI_version(600 : i32) {addr_space = 4 : i32} : i32


        


More information about the flang-commits mailing list