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
10 ; ASM: .byte{{.*}}DW_TAG_variable
11 ; ASM-NOT: .byte{{.*}}DW_AT_location
12 ; ASM-NOT: .vbyte{{.*}}i[TL]
13 ; ASM: .byte{{.*}}DW_TAG_
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
24 @i = thread_local global i32 20, align 4, !dbg !0
26 define i32 @foo() !dbg !12 {
28 %retval = alloca i32, align 4
29 store i32 0, ptr %retval, align 4
30 %0 = load i32, ptr @i, align 4, !dbg !16
35 !llvm.module.flags = !{!6, !7, !8, !9, !10}
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: ".")
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)
54 !16 = !DILocation(line: 4, scope: !12)