1- ; RUN: llc < %s -asm-verbose -mattr=+ptx76 | FileCheck %s
2- ; RUN: %if ptxas %{ llc < % s -asm-verbose -mattr=+ptx76 | %ptxas-verify %}
1+ ; REQUIRES: object-emission
2+ ; RUN: %llc_dwarf % s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
33
4- target triple = "nvptx64-nvidia-cuda"
5- target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-i128:128:128-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"
64
7- ; CHECK: {{.*}}section {{.*}}debug_info
85; CHECK: {{.*}}DW_TAG_variable
9- ; CHECK-NEXT: {{.*}} DW_AT_address_class
10- ; CHECK-NEXT: .b8 1{{.*}} DW_AT_const_value
11- ; CHECK-NEXT: {{.*}} DW_AT_name
6+ ; CHECK-NEXT: {{.*}} DW_AT_name ("global_bool_const")
7+ ; CHECK: {{.*}} DW_AT_const_value (1)
8+ ; CHECK: {{.*}}DW_TAG_variable
9+ ; CHECK-NEXT: {{.*}} DW_AT_const_value (1)
10+ ; CHECK-NEXT: {{.*}} DW_AT_name ("arg")
1211
1312define void @test () !dbg !5
1413{
1514entry:
16- %arg = alloca i1
17- store i1 true , i1* %arg , !dbg !6
1815 call void @"llvm.dbg.value" (metadata i1 true , metadata !7 , metadata !8 ), !dbg !6
1916 ret void , !dbg !6
2017}
@@ -23,15 +20,16 @@ declare void @"llvm.dbg.value"(metadata %".1", metadata %".2", metadata %".3")
2320
2421!llvm.dbg.cu = !{ !2 }
2522!llvm.module.flags = !{ !9 , !10 }
26- !nvvm.annotations = !{}
27-
28- !1 = !DIFile (directory: "/source/dir" , filename: "test.cu" )
29- !2 = distinct !DICompileUnit (emissionKind: FullDebug, file: !1 , isOptimized: false , language: DW_LANG_C_plus_plus, runtimeVersion: 0 )
23+ !0 = !{ !11 }
24+ !1 = !DIFile (directory: "" , filename: "test" )
25+ !2 = distinct !DICompileUnit (emissionKind: FullDebug, file: !1 , isOptimized: false , language: DW_LANG_C_plus_plus, runtimeVersion: 0 , globals: !0 )
3026!3 = !DIBasicType (encoding: DW_ATE_boolean, name: "bool" , size: 8 )
3127!4 = !DISubroutineType (types: !{null })
3228!5 = distinct !DISubprogram (file: !1 , isDefinition: true , isLocal: false , isOptimized: false , line: 5 , linkageName: "test" , name: "test" , scope: !1 , scopeLine: 5 , type: !4 , unit: !2 )
3329!6 = !DILocation (column: 1 , line: 5 , scope: !5 )
3430!7 = !DILocalVariable (arg: 0 , file: !1 , line: 5 , name: "arg" , scope: !5 , type: !3 )
3531!8 = !DIExpression ()
3632!9 = !{ i32 2 , !"Dwarf Version" , i32 4 }
37- !10 = !{ i32 2 , !"Debug Info Version" , i32 3 }
33+ !10 = !{ i32 2 , !"Debug Info Version" , i32 3 }
34+ !11 = !DIGlobalVariableExpression (var: !12 , expr: !DIExpression (DW_OP_consts, 18446744073709551615 , DW_OP_stack_value))
35+ !12 = distinct !DIGlobalVariable (name: "global_bool_const" , scope: !2 , file: !1 , line: 1 , type: !3 , isLocal: false , isDefinition: true )
0 commit comments