[lld] [llvm] [AMDGPU][NFC] Improve testing for AMDHSA ABI Version (PR #74300)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 07:52:26 PST 2023


================
@@ -1,14 +1,21 @@
-; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 < %s | FileCheck --check-prefixes=ASM %s
-; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 --filetype=obj < %s | llvm-readobj --file-headers - | FileCheck --check-prefixes=ELF %s
+; RUN: sed 's/CODE_OBJECT_VERSION/400/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 | FileCheck --check-prefixes=ASM,ASM4 %s
+; RUN: sed 's/CODE_OBJECT_VERSION/500/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 | FileCheck --check-prefixes=ASM,ASM5 %s
+; RUN: sed 's/CODE_OBJECT_VERSION/400/g' %s | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 --amdhsa-code-object-version=4 --filetype=obj | llvm-readobj --file-headers - | FileCheck --check-prefixes=ELF,ELF4 %s
----------------
arsenm wrote:

I wouldn't use both mechanisms to set the code object version, just use the module flag? If you want a test for the interaction between the cl::opt and the module flag, it should be targeted for that behavior specifically 

https://github.com/llvm/llvm-project/pull/74300


More information about the llvm-commits mailing list