Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / AArch64 / go_dwarf.test
blob7d2765a1c7fb150acfa4ff61553bac70b92c9fbc
1 # Check that the llvm-bolt update the dwarf information correctly in case:
2 #  - DW_AT_low_pc is nullified in case the DW_AT_ranges tag already exists.
3 #  - DW_AT_high_pc is in the form of DW_FORM_addr.
5 RUN: yaml2obj %p/Inputs/go_dwarf.yaml &> %t.exe
6 RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
8 # Check the original binary values.
9 RUN: llvm-dwarfdump -debug-info %t.exe 2>&1 | \
10 RUN:   FileCheck %s -check-prefix=CHECKORIG
12 CHECKORIG:         DW_TAG_compile_unit
13 CHECKORIG-NEXT:        DW_AT_producer
14 CHECKORIG-NEXT:        DW_AT_language
15 CHECKORIG-NEXT:        DW_AT_name
16 CHECKORIG-NEXT:        DW_AT_comp_dir
17 CHECKORIG-NEXT:        DW_AT_ranges      (0x00000000
18 CHECKORIG-NEXT:           [0x0000000000000660, 0x0000000000000684))
19 CHECKORIG-NEXT:        DW_AT_low_pc      (0x0000000000000660)
21 CHECKORIG:         DW_TAG_subprogram
22 CHECKORIG-NEXT:        DW_AT_external  (true)
23 CHECKORIG-NEXT:        DW_AT_name      ("main")
24 CHECKORIG-NEXT:        DW_AT_decl_file
25 CHECKORIG-NEXT:        DW_AT_decl_line (1)
26 CHECKORIG-NEXT:        DW_AT_decl_column       (0x05)
27 CHECKORIG-NEXT:        DW_AT_type
28 CHECKORIG-NEXT:        DW_AT_low_pc    (0x0000000000000660)
29 CHECKORIG-NEXT:        DW_AT_high_pc   (0x0000000000000684)
32 # Check the bolted binary.
33 RUN: llvm-dwarfdump -debug-info %t.bolt 2>&1 | FileCheck %s
35 CHECK:         DW_TAG_compile_unit
36 CHECK-NEXT:        DW_AT_producer
37 CHECK-NEXT:        DW_AT_language
38 CHECK-NEXT:        DW_AT_name
39 CHECK-NEXT:        DW_AT_comp_dir
40 CHECK-NEXT:        DW_AT_ranges      (0x00000010
41 CHECK-NEXT:           [0x0000000000000660, 0x0000000000000684))
42 CHECK-NEXT:        DW_AT_low_pc      (0x0000000000000000)
43 CHECK-NEXT:        DW_AT_stmt_list   (0x00000000)
45 CHECK:         DW_TAG_subprogram
46 CHECK-NEXT:        DW_AT_external  (true)
47 CHECK-NEXT:        DW_AT_name      ("main")
48 CHECK-NEXT:        DW_AT_decl_file
49 CHECK-NEXT:        DW_AT_decl_line (1)
50 CHECK-NEXT:        DW_AT_decl_column       (0x05)
51 CHECK-NEXT:        DW_AT_type
52 CHECK-NEXT:        DW_AT_low_pc    (0x0000000000000660)
53 CHECK-NEXT:        DW_AT_high_pc (0x0000000000000024)