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