[AMDGPU] Refactor and extend elf-header-flags-mach tests
authorScott Linder <Scott.Linder@amd.com>
Fri, 30 Oct 2020 18:37:28 +0000 (18:37 +0000)
committerScott Linder <Scott.Linder@amd.com>
Fri, 30 Oct 2020 18:57:04 +0000 (18:57 +0000)
commit13a56ca5a9c6a51ced795db295dee24c8f3710ad
tree18bd7ed533d6407b613d566ff2912dcecef6b7ed
parent81b6aa0e27abc3037c84d1ff2065bf60207f9b8b
[AMDGPU] Refactor and extend elf-header-flags-mach tests

* Factor out common elements of the input YAML document and use sed to
  macro replace the run line specific elements.
* Add checks for the common elements which depend on the ELF class.
* Use non-numeric suffix for temporary files to avoid merge conflicts.
* Sort tests by GFX# ascending.
* Group ELF and YAML tests by GFX#.

Reviewed By: t-tye

Differential Revision: https://reviews.llvm.org/D90245
llvm/test/CodeGen/AMDGPU/elf-header-flags-mach.ll
llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml