
These date back to when the non-intrinsic format of variable locations was still being tested and was behind a compile-time flag, so not all builds / bots would correctly run them. The solution at the time, to get at least some test coverage, was to have tests opt-in to non-intrinsic debug-info if it was built into LLVM. Nowadays, non-intrinsic format is the default and has been on for more than a year, there's no need for this flag to exist. (I've downgraded the flag from "try" to explicitly requesting non-intrinsic format in some places, so that we can deal with tests that are explicitly about non-intrinsic format in their own commit).
42 lines
1.9 KiB
LLVM
42 lines
1.9 KiB
LLVM
; RUN: opt -passes=declare-to-assign %s -S | FileCheck %s
|
|
|
|
;; Check declare-to-assign skips scalable vectors for now. i.e. do not replace
|
|
;; the dbg.declare with a dbg.assign intrinsic.
|
|
|
|
; CHECK: #dbg_declare(ptr %c
|
|
|
|
define dso_local void @b() !dbg !9 {
|
|
entry:
|
|
%c = alloca <vscale x 8 x i32>, align 4
|
|
call void @llvm.dbg.declare(metadata ptr %c, metadata !13, metadata !DIExpression()), !dbg !21
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.dbg.declare(metadata, metadata, metadata)
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
!llvm.module.flags = !{!2, !3, !5, !7}
|
|
!llvm.ident = !{!8}
|
|
|
|
!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)
|
|
!1 = !DIFile(filename: "test.c", directory: "/")
|
|
!2 = !{i32 7, !"Dwarf Version", i32 5}
|
|
!3 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!5 = !{i32 1, !"target-abi", !"lp64"}
|
|
!7 = !{i32 8, !"SmallDataLimit", i32 8}
|
|
!8 = !{!"clang version 17.0.0"}
|
|
!9 = distinct !DISubprogram(name: "b", scope: !1, file: !1, line: 2, type: !10, scopeLine: 2, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)
|
|
!10 = !DISubroutineType(types: !11)
|
|
!11 = !{null}
|
|
!12 = !{}
|
|
!13 = !DILocalVariable(name: "c", scope: !9, file: !1, line: 2, type: !14)
|
|
!14 = !DIDerivedType(tag: DW_TAG_typedef, name: "a", file: !1, line: 1, baseType: !15)
|
|
!15 = !DIDerivedType(tag: DW_TAG_typedef, name: "__rvv_uint32m4_t", file: !16, baseType: !17)
|
|
!16 = !DIFile(filename: "test.c", directory: "/")
|
|
!17 = !DICompositeType(tag: DW_TAG_array_type, baseType: !18, flags: DIFlagVector, elements: !19)
|
|
!18 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
|
|
!19 = !{!20}
|
|
!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))
|
|
!21 = !DILocation(line: 2, column: 14, scope: !9)
|
|
|