xref: /llvm-project/llvm/test/DebugInfo/X86/convert-inlined.ll (revision cbd754163934a64e65b87a0f1b2c6741af8d24db)
1; RUN: llc -mtriple=x86_64 -dwarf-version=5 -filetype=obj -O0 < %s | llvm-dwarfdump - \
2; RUN:   | FileCheck %s --check-prefix=DW5 "--implicit-check-not={{DW_TAG|NULL}}"
3; RUN: llc -mtriple=x86_64 -dwarf-version=4 -filetype=obj -O0 < %s | llvm-dwarfdump - \
4; RUN:   | FileCheck %s --check-prefix=DW4 "--implicit-check-not={{DW_TAG|NULL}}"
5
6; DW5: .debug_info contents:
7; DW5: DW_TAG_compile_unit
8; DW5:[[SIG8:.*]]:   DW_TAG_base_type
9; DW5-NEXT:DW_AT_name ("DW_ATE_signed_8")
10; DW5-NEXT:DW_AT_encoding (DW_ATE_signed)
11; DW5-NEXT:DW_AT_byte_size (0x01)
12; DW5-NOT: DW_AT
13; DW5:[[SIG32:.*]]:   DW_TAG_base_type
14; DW5-NEXT:DW_AT_name ("DW_ATE_signed_32")
15; DW5-NEXT:DW_AT_encoding (DW_ATE_signed)
16; DW5-NEXT:DW_AT_byte_size (0x04)
17; DW5-NOT: DW_AT
18; DW5:   DW_TAG_variable
19; DW5:     DW_AT_name ("global")
20; DW5:     DW_AT_location (DW_OP_addrx 0x0, DW_OP_deref, DW_OP_convert ([[SIG8]]) "DW_ATE_signed_8", DW_OP_convert ([[SIG32]]) "DW_ATE_signed_32", DW_OP_stack_value)
21; DW5:   DW_TAG_base_type
22; DW5:     DW_AT_name ("int")
23; DW5:   NULL
24
25; DW4: .debug_info contents:
26; DW4: DW_TAG_compile_unit
27; DW4:   DW_TAG_variable
28; DW4:     DW_AT_name ("global")
29; DW4:     DW_AT_location (DW_OP_addr 0x0, DW_OP_deref, DW_OP_dup, DW_OP_constu 0x7, DW_OP_shr, DW_OP_lit0, DW_OP_not, DW_OP_mul, DW_OP_constu 0x8, DW_OP_shl, DW_OP_or, DW_OP_stack_value)
30; DW4:   DW_TAG_base_type
31; DW4:     DW_AT_name ("int")
32; DW4:   NULL
33
34@global = dso_local global i32 255, align 4, !dbg !0
35
36!llvm.dbg.cu = !{!2}
37!llvm.module.flags = !{!7, !8, !9}
38!llvm.ident = !{!10}
39
40!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression(DW_OP_deref, DW_OP_LLVM_convert, 8, DW_ATE_signed, DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_stack_value))
41!1 = distinct !DIGlobalVariable(name: "global", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
42!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 9.0.0 (trunk 353791) (llvm/trunk 353801)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: None)
43!3 = !DIFile(filename: "dbg.c", directory: "/tmp", checksumkind: CSK_MD5, checksum: "7c731722dd7304ccb8e366ae80269b82")
44!4 = !{}
45!5 = !{!0}
46!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
47!7 = !{i32 2, !"Dwarf Version", i32 5}
48!8 = !{i32 2, !"Debug Info Version", i32 3}
49!9 = !{i32 1, !"wchar_size", i32 4}
50!10 = !{!"clang version 9.0.0 (trunk 353791) (llvm/trunk 353801)"}
51