[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / tools / llvm-dwp / X86 / simple.test
blob788e6f5cfe4f7904505f657fe0d9cf3436a0f24c
1 RUN: llvm-dwp %p/../Inputs/simple/notypes/a.dwo %p/../Inputs/simple/notypes/b.dwo -o %t
2 RUN: llvm-dwarfdump -v %t | FileCheck --check-prefixes=CHECK,NOTYP %s
3 RUN: llvm-objdump -h %t | FileCheck --check-prefix=NOTYPOBJ %s
4 RUN: llvm-dwp %p/../Inputs/simple/types/a.dwo %p/../Inputs/simple/types/b.dwo -o - \
5 RUN:   | llvm-dwarfdump -v - | FileCheck --check-prefixes=CHECK,TYPES %s
7 DWP from non-type-unit debug info for these two translation units:
8 a.cpp:
9   struct foo { };
10   foo a;
12 b.cpp:
13   struct bar { };
14   void b(bar) {
15   }
17 CHECK-LABEL: .debug_abbrev.dwo contents:
18 CHECK-LABEL: Abbrev table for offset:
19 CHECK: 0x0000[[AAOFF:.*]]
20 CHECK: DW_TAG_compile_unit
21 CHECK: DW_TAG_variable
22 CHECK: DW_TAG_structure_type
23 CHECK-LABEL: Abbrev table for offset:
24 CHECK: 0x0000[[BAOFF:.*]]
25 CHECK: DW_TAG_compile_unit
26 CHECK: DW_TAG_structure_type
27 CHECK: DW_TAG_subprogram
28 CHECK: DW_TAG_formal_parameter
30 CHECK: .debug_info.dwo contents:
31 CHECK: [[AOFF:0x[0-9a-f]*]]:
32 CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 abbr_offset =
33 CHECK:         0x[[AAOFF]] addr_size = 0x08 (next unit at [[BOFF:.*]])
34 CHECK: DW_TAG_compile_unit
35 CHECK:   DW_AT_name {{.*}} "a.cpp"
36 CHECK:   DW_AT_GNU_dwo_id {{.*}} ([[DWOA:.*]])
37 CHECK:   DW_TAG_variable
38 CHECK:     DW_AT_name {{.*}} "a"
39 CHECK:   DW_TAG_structure_type
40 NOTYP:     DW_AT_name {{.*}} "foo"
41 TYPES:     DW_AT_signature {{.*}} ([[FOOSIG:.*]])
43 CHECK: [[BOFF]]:
44 CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 abbr_offset =
45 CHECK:         0x[[BAOFF]] addr_size = 0x08 (next unit at [[XOFF:.*]])
46 CHECK:   DW_AT_name {{.*}} "b.cpp"
47 CHECK:   DW_AT_GNU_dwo_id {{.*}} ([[DWOB:.*]])
48 CHECK:   DW_TAG_structure_type
49 NOTYP:     DW_AT_name {{.*}} "bar"
50 TYPES:     DW_AT_signature {{.*}} ([[BARSIG:.*]])
51 CHECK:   DW_TAG_subprogram
52 CHECK:     DW_AT_name {{.*}} "b"
53 CHECK:     DW_TAG_formal_parameter
55 NOTYP-NOT: .debug_types.dwo contents:
56 TYPES-LABEL: .debug_types.dwo contents:
57 TYPES: [[FOOUOFF:0x[0-9a-f]*]]:
58 TYPES-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset =
59 TYPES:         0x[[AAOFF]] addr_size = 0x08 name = 'foo' type_signature = [[FOOSIG]] type_offset = 0x[[FOOOFF:.*]] (next unit at [[BARUOFF:.*]])
60 TYPES:             DW_TAG_type_unit
61 TYPES: [[FOOOFF]]:   DW_TAG_structure_type
62 TYPES:                 DW_AT_name {{.*}} "foo"
63 TYPES: [[BARUOFF]]:
64 TYPES-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset =
65 TYPES:         0x[[BAOFF]] addr_size = 0x08 name = 'bar' type_signature = [[BARSIG]] type_offset = 0x001e (next unit at [[XUOFF:.*]])
66 TYPES:             DW_TAG_type_unit
67 TYPES: 0x00000042:   DW_TAG_structure_type
68 TYPES:                 DW_AT_name {{.*}} "bar"
70 CHECK-LABEL: .debug_cu_index contents:
71 CHECK: Index Signature INFO                      ABBREV                             LINE                     STR_OFFSETS
72 TYPES:     1 [[DWOA]]  {{\[}}[[AOFF]], [[BOFF]]) [0x0000[[AAOFF]], 0x0000[[BAOFF]]) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
73 TYPES:     3 [[DWOB]]  {{\[}}[[BOFF]], [[XOFF]]) [0x0000[[BAOFF]], 0x00000099)      [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
74 NOTYP:     3 [[DWOA]]  {{\[}}[[AOFF]], [[BOFF]]) [0x0000[[AAOFF]], 0x0000[[BAOFF]]) [0x00000000, 0x00000011) [0x00000000, 0x00000010)
75 NOTYP:     4 [[DWOB]]  {{\[}}[[BOFF]], [[XOFF]]) [0x0000[[BAOFF]], 0x00000075)      [0x00000011, 0x00000022) [0x00000010, 0x00000024)
77 Ensure we do not create a debug_tu_index, even an empty or malformed one.
78 NOTYPOBJ-NOT: .debug_tu_index
80 TYPES: Index Signature  TYPES                           ABBREV                             LINE                     STR_OFFSETS
81 TYPES:     1 [[FOOSIG]] {{\[}}[[FOOUOFF]], [[BARUOFF]]) [0x0000[[AAOFF]], 0x0000[[BAOFF]]) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
82 TYPES:     4 [[BARSIG]] {{\[}}[[BARUOFF]], [[XUOFF]])   [0x0000[[BAOFF]], 0x00000099)      [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
84 CHECK-LABEL: .debug_str.dwo contents:
85 CHECK: "clang version
86 CHECK: 0x[[ACPP:.*]]: "a.cpp"
87 CHECK-NOT: "clang version
88 CHECK: 0x[[BCPP:.*]]: "b.cpp"
90 CHECK-LABEL: .debug_str_offsets.dwo contents:
91 CHECK: : 00000000
92 CHECK: : [[ACPP]]
93 CHECK: : 00000000
94 CHECK: : [[BCPP]]