AMDGPU: Add and set AMDGPU-specific e_flags

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

llvm-svn: 314987
diff --git a/llvm/test/CodeGen/AMDGPU/elf-header.ll b/llvm/test/CodeGen/AMDGPU/elf-header.ll
index de9714c..192eb78 100644
--- a/llvm/test/CodeGen/AMDGPU/elf-header.ll
+++ b/llvm/test/CodeGen/AMDGPU/elf-header.ll
@@ -23,11 +23,11 @@
 ; RUN: llc -mtriple=amdgcn-unknown-mesa3d -filetype=obj < %s | llvm-readobj -file-headers - | FileCheck --check-prefix=GCN --check-prefix=GCN-OSABI-MESA3D %s
 
 ; R600: Format: ELF32-amdgpu
-; R600: Arch: unknown
+; R600: Arch: r600
 ; R600: AddressSize: 32bit
-; GCN: Format: ELF64-amdgpu
-; GCN: Arch: amdgcn
-; GCN: AddressSize: 64bit
+; GCN:  Format: ELF64-amdgpu
+; GCN:  Arch: amdgcn
+; GCN:  AddressSize: 64bit
 
 ; R600-OSABI-NONE:  OS/ABI: SystemV (0x0)
 ; GCN-OSABI-NONE:   OS/ABI: SystemV (0x0)
@@ -36,8 +36,14 @@
 ; GCN-OSABI-MESA3D: OS/ABI: AMDGPU_MESA3D (0x42)
 
 ; R600: Machine: EM_AMDGPU (0xE0)
-; GCN: Machine: EM_AMDGPU (0xE0)
+; R600: Flags [ (0x1)
+; R600:   EF_AMDGPU_ARCH_R600 (0x1)
+; R600: ]
+; GCN:  Machine: EM_AMDGPU (0xE0)
+; GCN:  Flags [ (0x2)
+; GCN:    EF_AMDGPU_ARCH_GCN (0x2)
+; GCN:  ]
 
 define amdgpu_kernel void @elf_header() {
   ret void
-}
\ No newline at end of file
+}