1; RUN: opt %s -S -passes=declare-to-assign -o - | FileCheck %s 2; RUN: opt --try-experimental-debuginfo-iterators %s -S -passes=declare-to-assign -o - | FileCheck %s 3 4;; Generated from this C++: 5;; long double get(); 6;; void fun() { 7;; long double f; 8;; } 9 10;; Check a variable that is larger (128 bits according to !15) than its backing 11;; alloca (80 bits) can be represented with assignment tracking. Create a 12;; fragment for the dbg.assign for bits 0-80. 13 14; CHECK: #dbg_assign(i1 undef, ![[#]], !DIExpression(DW_OP_LLVM_fragment, 0, 80), ![[#]], ptr %f, !DIExpression(), 15 16define dso_local void @_Z3funv() #0 !dbg !10 { 17entry: 18 %f = alloca x86_fp80, align 16 19 call void @llvm.dbg.declare(metadata ptr %f, metadata !14, metadata !DIExpression()), !dbg !16 20 ret void 21} 22 23declare void @llvm.dbg.declare(metadata, metadata, metadata) 24 25!llvm.dbg.cu = !{!0} 26!llvm.module.flags = !{!2, !3} 27!llvm.ident = !{!9} 28 29!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 17.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) 30!1 = !DIFile(filename: "test.cpp", directory: "/") 31!2 = !{i32 7, !"Dwarf Version", i32 5} 32!3 = !{i32 2, !"Debug Info Version", i32 3} 33!9 = !{!"clang version 17.0.0"} 34!10 = distinct !DISubprogram(name: "fun", linkageName: "_Z3funv", scope: !1, file: !1, line: 2, type: !11, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13) 35!11 = !DISubroutineType(types: !12) 36!12 = !{null} 37!13 = !{} 38!14 = !DILocalVariable(name: "f", scope: !10, file: !1, line: 3, type: !15) 39!15 = !DIBasicType(name: "long double", size: 128, encoding: DW_ATE_float) 40!16 = !DILocation(line: 3, column: 15, scope: !10) 41