Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / tools / llvm-readobj / ELF / note-amdgpu-invalid.s
blob25e0d3fc6ab1cce473a375b25b9c92e4b8d874c9
1 # RUN: yaml2obj %s -o %t.o
2 # RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM
3 # RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU
5 # GNU: Displaying notes found in: .note.foo
6 # GNU-NEXT: Owner Data size Description
7 # GNU-NEXT: AMDGPU 0x000000d4 NT_AMDGPU_METADATA (AMDGPU Metadata)
8 # GNU-NEXT: AMDGPU Metadata:
9 # GNU-NEXT: Invalid AMDGPU Metadata
10 # GNU-NEXT: ---
11 # GNU-NEXT: amdhsa.kernels:
12 # GNU-NEXT: - .group_segment_fixed_size: 2
13 # GNU-NEXT: .kernarg_segment_align: 4
14 # GNU-NEXT: .kernarg_segment_size: 1
15 # GNU-NEXT: .max_flat_workgroup_size: 8
16 # GNU-NEXT: .name: foo
17 # GNU-NEXT: .private_segment_fixed_size: 3
18 # GNU-NEXT: .sgpr_count: 6
19 # GNU-NEXT: .symbol: foo
20 # GNU-NEXT: .vgpr_count: 7
21 # GNU-NEXT: .wavefront_size: 5
22 # GNU-NEXT: ...
23 # GNU-EMPTY:
24 # GNU-EMPTY:
25 # GNU-NEXT: Displaying notes found in: .note.bar
26 # GNU-NEXT: Owner Data size Description
27 # GNU-NEXT: AMDGPU 0x00000003 NT_AMDGPU_METADATA (AMDGPU Metadata)
28 # GNU-NEXT: description data: 12 34 56
29 # GNU-EMPTY:
31 # LLVM: Notes [
32 # LLVM-NEXT: NoteSection {
33 # LLVM-NEXT: Name: .note.foo
34 # LLVM-NEXT: Offset: 0x40
35 # LLVM-NEXT: Size: 0xE8
36 # LLVM-NEXT: Note {
37 # LLVM-NEXT: Owner: AMDGPU
38 # LLVM-NEXT: Data size: 0xD4
39 # LLVM-NEXT: Type: NT_AMDGPU_METADATA (AMDGPU Metadata)
40 # LLVM-NEXT: AMDGPU Metadata: Invalid AMDGPU Metadata
41 # LLVM-NEXT: ---
42 # LLVM-NEXT: amdhsa.kernels:
43 # LLVM-NEXT: - .group_segment_fixed_size: 2
44 # LLVM-NEXT: .kernarg_segment_align: 4
45 # LLVM-NEXT: .kernarg_segment_size: 1
46 # LLVM-NEXT: .max_flat_workgroup_size: 8
47 # LLVM-NEXT: .name: foo
48 # LLVM-NEXT: .private_segment_fixed_size: 3
49 # LLVM-NEXT: .sgpr_count: 6
50 # LLVM-NEXT: .symbol: foo
51 # LLVM-NEXT: .vgpr_count: 7
52 # LLVM-NEXT: .wavefront_size: 5
53 # LLVM-NEXT: ...
54 # LLVM-EMPTY:
55 # LLVM-NEXT: }
56 # LLVM-NEXT: }
57 # LLVM-NEXT: NoteSection {
58 # LLVM-NEXT: Name: .note.bar
59 # LLVM-NEXT: Offset: 0x128
60 # LLVM-NEXT: Size: 0x18
61 # LLVM-NEXT: Note {
62 # LLVM-NEXT: Owner: AMDGPU
63 # LLVM-NEXT: Data size: 0x3
64 # LLVM-NEXT: Type: NT_AMDGPU_METADATA (AMDGPU Metadata)
65 # LLVM-NEXT: Description data (
66 # LLVM-NEXT: 0000: 123456 |.4V|
67 # LLVM-NEXT: )
68 # LLVM-NEXT: }
69 # LLVM-NEXT: }
70 # LLVM-NEXT:]
72 ## Use yaml2obj instead of llvm-mc for more test portability. This was
73 ## generated by grabbing section data from note-amdgpu.s and removing the amdhsa.version field.
75 --- !ELF
76 FileHeader:
77 Class: ELFCLASS64
78 Data: ELFDATA2LSB
79 Type: ET_REL
80 Sections:
81 - Name: .note.foo
82 Type: SHT_NOTE
83 Content: 07000000D400000020000000414D44475055000081ae616d646873612e6b65726e656c73918ab92e67726f75705f7365676d656e745f66697865645f73697a6502b62e6b65726e6172675f7365676d656e745f616c69676e04b52e6b65726e6172675f7365676d656e745f73697a6501b82e6d61785f666c61745f776f726b67726f75705f73697a6508a52e6e616d65a3666f6fbb2e707269766174655f7365676d656e745f66697865645f73697a6503ab2e736770725f636f756e7406a72e73796d626f6ca3666f6fab2e766770725f636f756e7407af2e7761766566726f6e745f73697a6505
84 - Name: .note.bar
85 Type: SHT_NOTE
86 Notes:
87 - Name: AMDGPU
88 Type: NT_AMDGPU_METADATA
89 Desc: '123456'
90 # TODO: https://bugs.llvm.org/show_bug.cgi?id=49034
91 # - Name: AMDGPU
92 # Type: NT_AMDGPU_METADATA
93 # Desc: 'abcdef'