xref: /llvm-project/llvm/test/CodeGen/PowerPC/tls-debug-aix.ll (revision 5403c59c608c08c8ecd4303763f08eb046eb5e4d)
1; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s --check-prefix=ASM
2; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s --check-prefix=ASM
3; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj < %s | \
4; RUN:   llvm-dwarfdump -i - | FileCheck %s --check-prefix=OBJ
5; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj < %s | \
6; RUN:   llvm-dwarfdump -i - | FileCheck %s --check-prefix=OBJ
7
8; ASM:         .dwsect 0x10000
9; ASM-NEXT:    .dwinfo:
10; ASM:         .byte{{.*}}DW_TAG_variable
11; ASM-NOT:     .byte{{.*}}DW_AT_location
12; ASM-NOT:     .vbyte{{.*}}i[TL]
13; ASM:         .byte{{.*}}DW_TAG_
14
15; OBJ:        DW_TAG_variable
16; OBJ-NEXT:     DW_AT_name{{.*}}("i")
17; OBJ-NEXT:     DW_AT_type
18; OBJ-NEXT:     DW_AT_external
19; OBJ-NEXT:     DW_AT_decl_file
20; OBJ-NEXT:     DW_AT_decl_line
21; OBJ-NOT:      DW_AT_location{{.*}}DW_OP_form_tls_address
22; OBJ:        DW_TAG_
23
24@i = thread_local global i32 20, align 4, !dbg !0
25
26define i32 @foo() !dbg !12 {
27entry:
28  %retval = alloca i32, align 4
29  store i32 0, ptr %retval, align 4
30  %0 = load i32, ptr @i, align 4, !dbg !16
31  ret i32 %0, !dbg !16
32}
33
34!llvm.dbg.cu = !{!2}
35!llvm.module.flags = !{!6, !7, !8, !9, !10}
36!llvm.ident = !{!11}
37
38!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
39!1 = distinct !DIGlobalVariable(name: "i", scope: !2, file: !3, line: 2, type: !5, isLocal: false, isDefinition: true)
40!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "IBM Open XL C/C++ for AIX", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
41!3 = !DIFile(filename: "t.c", directory: ".")
42!4 = !{!0}
43!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
44!6 = !{i32 7, !"Dwarf Version", i32 3}
45!7 = !{i32 2, !"Debug Info Version", i32 3}
46!8 = !{i32 1, !"wchar_size", i32 2}
47!9 = !{i32 7, !"PIC Level", i32 2}
48!10 = !{i32 7, !"frame-pointer", i32 2}
49!11 = !{!"IBM Open XL C/C++ for AIX"}
50!12 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 3, type: !13, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15)
51!13 = !DISubroutineType(types: !14)
52!14 = !{!5}
53!15 = !{}
54!16 = !DILocation(line: 4, scope: !12)
55