1; RUN: opt -passes=declare-to-assign %s -S | FileCheck %s 2; RUN: opt --try-experimental-debuginfo-iterators -passes=declare-to-assign %s -S | FileCheck %s 3 4;; Check declare-to-assign skips scalable vectors for now. i.e. do not replace 5;; the dbg.declare with a dbg.assign intrinsic. 6 7; CHECK: #dbg_declare(ptr %c 8 9define dso_local void @b() !dbg !9 { 10entry: 11 %c = alloca <vscale x 8 x i32>, align 4 12 call void @llvm.dbg.declare(metadata ptr %c, metadata !13, metadata !DIExpression()), !dbg !21 13 ret void 14} 15 16declare void @llvm.dbg.declare(metadata, metadata, metadata) 17 18!llvm.dbg.cu = !{!0} 19!llvm.module.flags = !{!2, !3, !5, !7} 20!llvm.ident = !{!8} 21 22!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 17.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) 23!1 = !DIFile(filename: "test.c", directory: "/") 24!2 = !{i32 7, !"Dwarf Version", i32 5} 25!3 = !{i32 2, !"Debug Info Version", i32 3} 26!5 = !{i32 1, !"target-abi", !"lp64"} 27!7 = !{i32 8, !"SmallDataLimit", i32 8} 28!8 = !{!"clang version 17.0.0"} 29!9 = distinct !DISubprogram(name: "b", scope: !1, file: !1, line: 2, type: !10, scopeLine: 2, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) 30!10 = !DISubroutineType(types: !11) 31!11 = !{null} 32!12 = !{} 33!13 = !DILocalVariable(name: "c", scope: !9, file: !1, line: 2, type: !14) 34!14 = !DIDerivedType(tag: DW_TAG_typedef, name: "a", file: !1, line: 1, baseType: !15) 35!15 = !DIDerivedType(tag: DW_TAG_typedef, name: "__rvv_uint32m4_t", file: !16, baseType: !17) 36!16 = !DIFile(filename: "test.c", directory: "/") 37!17 = !DICompositeType(tag: DW_TAG_array_type, baseType: !18, flags: DIFlagVector, elements: !19) 38!18 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) 39!19 = !{!20} 40!20 = !DISubrange(lowerBound: 0, upperBound: !DIExpression(DW_OP_bregx, 7202, 0, DW_OP_constu, 4, DW_OP_div, DW_OP_constu, 4, DW_OP_mul, DW_OP_constu, 1, DW_OP_minus)) 41!21 = !DILocation(line: 2, column: 14, scope: !9) 42 43