1;; This test checks for emission of DW_OP_implicit_value operation 2;; for double type. 3 4; RUN: llc -O0 -debugger-tune=gdb -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s --check-prefixes=CHECK,BOTH 5; RUN: llc --try-experimental-debuginfo-iterators -O0 -debugger-tune=gdb -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s --check-prefixes=CHECK,BOTH 6 7; RUN: llc -O0 -debugger-tune=lldb -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s --check-prefixes=CHECK,BOTH 8; RUN: llc --try-experimental-debuginfo-iterators -O0 -debugger-tune=lldb -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s --check-prefixes=CHECK,BOTH 9 10; CHECK: .debug_info contents: 11; CHECK: DW_TAG_variable 12; CHECK-NEXT: DW_AT_location ({{.*}} 13; CHECK-NEXT: [{{.*}}): DW_OP_implicit_value 0x8 0x1f 0x85 0xeb 0x51 0xb8 0x1e 0x09 0x40) 14; CHECK-NEXT: DW_AT_name ("d") 15 16; RUN: llc -O0 -debugger-tune=sce -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s -check-prefixes=SCE-CHECK,BOTH 17; RUN: llc --try-experimental-debuginfo-iterators -O0 -debugger-tune=sce -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s -check-prefixes=SCE-CHECK,BOTH 18 19; SCE-CHECK: .debug_info contents: 20; SCE-CHECK: DW_TAG_variable 21; SCE-CHECK-NEXT: DW_AT_location ({{.*}} 22; SCE-CHECK-NEXT: [{{.*}}): DW_OP_constu 0x40091eb851eb851f, DW_OP_stack_value) 23; SCE-CHECK-NEXT: DW_AT_name ("d") 24 25;; Using DW_OP_implicit_value for fragments is not currently supported. 26; BOTH: DW_TAG_variable 27; BOTH-NEXT: DW_AT_location ({{.*}} 28; BOTH-NEXT: [{{.*}}): DW_OP_constu 0x4047800000000000, DW_OP_stack_value, DW_OP_piece 0x8, DW_OP_constu 0x4052800000000000, DW_OP_stack_value, DW_OP_piece 0x8) 29; BOTH-NEXT: DW_AT_name ("c") 30 31; ModuleID = 'implicit_value-double.c' 32source_filename = "implicit_value-double.c" 33target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 34target triple = "x86_64-unknown-linux-gnu" 35 36@str = private unnamed_addr constant [6 x i8] c"dummy\00", align 1 37 38; Function Attrs: nofree nounwind uwtable 39define dso_local i32 @main() local_unnamed_addr #0 !dbg !7 { 40entry: 41 call void @llvm.dbg.value(metadata double 3.140000e+00, metadata !12, metadata !DIExpression()), !dbg !14 42 call void @llvm.dbg.value(metadata double 4.700000e+01, metadata !17, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64)), !dbg !14 43 call void @llvm.dbg.value(metadata double 7.400000e+01, metadata !17, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64)), !dbg !14 44 %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str), !dbg !15 45 call void @llvm.dbg.value(metadata double undef, metadata !12, metadata !DIExpression()), !dbg !14 46 ret i32 0, !dbg !16 47} 48 49; Function Attrs: nounwind readnone speculatable willreturn 50declare void @llvm.dbg.value(metadata, metadata, metadata) #1 51 52; Function Attrs: nofree nounwind 53declare i32 @puts(ptr nocapture readonly) local_unnamed_addr #2 54 55attributes #0 = { nofree nounwind uwtable } 56attributes #1 = { nounwind readnone speculatable willreturn } 57attributes #2 = { nofree nounwind } 58 59!llvm.dbg.cu = !{!0} 60!llvm.module.flags = !{!3, !4, !5} 61!llvm.ident = !{!6} 62 63!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) 64!1 = !DIFile(filename: "implicit_value-double.c", directory: "/home/") 65!2 = !{} 66!3 = !{i32 7, !"Dwarf Version", i32 4} 67!4 = !{i32 2, !"Debug Info Version", i32 3} 68!5 = !{i32 1, !"wchar_size", i32 4} 69!6 = !{!"clang version 11.0.0"} 70!7 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !11) 71!8 = !DISubroutineType(types: !9) 72!9 = !{!10} 73!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 74!11 = !{!12, !17} 75!12 = !DILocalVariable(name: "d", scope: !7, file: !1, line: 2, type: !13) 76!13 = !DIBasicType(name: "double", size: 64, encoding: DW_ATE_float) 77!14 = !DILocation(line: 0, scope: !7) 78!15 = !DILocation(line: 3, column: 2, scope: !7) 79!16 = !DILocation(line: 5, column: 2, scope: !7) 80!17 = !DILocalVariable(name: "c", scope: !7, file: !1, line: 2, type: !18) 81!18 = !DIBasicType(name: "complex", size: 128, encoding: DW_ATE_complex_float) 82