Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / X86 / dwarf5-ftypes-dwo-mono-input-dwp-output.test
blob69758505c2a61a49bf73e6b45ecef03a00c6c5f6
1 # REQUIRES: system-linux
2 ; RUN: rm -rf %t
3 ; RUN: mkdir %t
4 ; RUN: cd %t
5 ; RUN: llvm-mc --split-dwarf-file=main.dwo   -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-split-gdb-index-types-main.s -o main.o
6 ; RUN: llvm-mc --split-dwarf-file=helper.dwo -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-split-gdb-index-types-helper.s -o helper1.o
7 ; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-types-helper2.s -o helper2.o
8 ; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper1.o helper2.o -o main.exe
9 ; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.dwo | FileCheck -check-prefix=PRE-BOLT %s
10 ; RUN: llvm-dwarfdump --show-form --verbose --debug-info helper2.o | FileCheck -check-prefix=PRE-BOLT2 %s
11 ; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --write-dwp
12 ; RUN: llvm-dwarfdump --show-form --verbose --debug-info -r 0 main.exe.bolt.dwp | FileCheck -check-prefix=BOLT %s
13 ; RUN: llvm-dwarfdump --show-form --verbose --debug-tu-index main.exe.bolt.dwp | FileCheck -check-prefix=BOLT-DWP-TU-INDEX %s
14 ; RUN: llvm-dwarfdump --show-form --verbose --debug-cu-index main.exe.bolt.dwp | FileCheck -check-prefix=BOLT-DWP-CU-INDEX %s
16 ; Test input into bolt a .dwo file with TU Index.
17 ; Test split-dwarf and monolithic TUs.
18 ; Make sure the output .dwp file has a type and cu information.
20 ; PRE-BOLT: Type Unit
21 ; PRE-BOLT-SAME: 0x675d23e4f33235f2
22 ; PRE-BOLT: Type Unit
23 ; PRE-BOLT-SAME: 0x49dc260088be7e56
25 ; PRE-BOLT2: 0x8f55ac73549bc003
26 ; PRE-BOLT2: DW_TAG_type_unit
27 ; PRE-BOLT2: 0xe7734af8fed0632e
28 ; PRE-BOLT2: DW_TAG_type_unit
30 ; BOLT: 0x00000000: Type Unit: length = 0x00000047
31 ; BOLT-SAME: 0x675d23e4f33235f2
32 ; BOLT: 0x0000004b: Type Unit: length = 0x0000003e
33 ; BOLT-SAME: 0x49dc260088be7e56
34 ; BOLT: 0x0000008d: Compile Unit: length = 0x00000077
35 ; BOLT-SAME: 0x4257354d8bb35644
36 ; BOLT: 0x00000108: Type Unit: length = 0x00000047
37 ; BOLT-SAME: 0x104ec427d2ebea6f
38 ; BOLT: 0x00000153: Type Unit: length = 0x0000003e
39 ; BOLT-SAME: 0xb4580bc1535df1e4
40 ; BOLT: 0x00000195: Compile Unit: length = 0x00000054
41 ; BOLT-SAME: 0x7738bfb5f3edfb73
42 ; BOLT-NOT: 0x8f55ac73549bc003
43 ; BOLT-NOT: 0xe7734af8fed0632e
45 ; BOLT-DWP-TU-INDEX: version = 5, units = 4, slots = 8
46 ; BOLT-DWP-TU-INDEX: Index Signature
47 ; BOLT-DWP-TU-INDEX: 3 0x675d23e4f33235f2 [0x0000000000000000, 0x000000000000004b) [0x00000000, 0x00000083) [0x00000000, 0x00000056) [0x00000000, 0x00000044)
48 ; BOLT-DWP-TU-INDEX: 5 0xb4580bc1535df1e4 [0x0000000000000153, 0x0000000000000195) [0x00000083, 0x000000f9) [0x00000056, 0x000000ae) [0x00000044, 0x00000084)
49 ; BOLT-DWP-TU-INDEX: 7 0x49dc260088be7e56 [0x000000000000004b, 0x000000000000008d) [0x00000000, 0x00000083) [0x00000000, 0x00000056) [0x00000000, 0x00000044)
50 ; BOLT-DWP-TU-INDEX: 8 0x104ec427d2ebea6f [0x0000000000000108, 0x0000000000000153) [0x00000083, 0x000000f9) [0x00000056, 0x000000ae) [0x00000044, 0x00000084)
52 ; BOLT-DWP-CU-INDEX: version = 5, units = 2, slots = 4
53 ; BOLT-DWP-CU-INDEX: Index Signature
54 ; BOLT-DWP-CU-INDEX: 1 0x4257354d8bb35644 [0x000000000000008d, 0x0000000000000108) [0x00000000, 0x00000083) [0x00000000, 0x00000056) [0x00000000, 0x00000044)
55 ; BOLT-DWP-CU-INDEX: 4 0x7738bfb5f3edfb73 [0x0000000000000195, 0x00000000000001ed) [0x00000083, 0x000000f9) [0x00000056, 0x000000ae) [0x00000044, 0x00000084)