brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · be3123c Raw
48 lines · plain
1; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s2 3 4 5;; Local variable has global storage. Check AssignmentTrackingAnalysis doesn't6;; crash/assert.7 8;; FIXME: We ideally want a DBG_VALUE deref here. It's not possible with the9;; current setup, but will be possible when assignment tracking is extended to10;; understand non-alloca storage.11 12; CHECK: stack: []13; CHECK-NOT: DBG_14 15target triple = "x86_64-unknown-linux-gnu"16 17@a = dso_local global i32 0, align 418 19define dso_local void @_Z3funi(i32 noundef %x) !dbg !15 {20entry:21  store i32 %x, ptr @a, align 4, !DIAssignID !2722  call void @llvm.dbg.assign(metadata i32 %x, metadata !23, metadata !DIExpression(), metadata !27, metadata ptr @a, metadata !DIExpression()), !dbg !2123  ret void24}25 26declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)27 28!llvm.dbg.cu = !{!2}29!llvm.module.flags = !{!6, !7, !13}30!llvm.ident = !{!14}31 32!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 17.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)33!3 = !DIFile(filename: "test.cpp", directory: "/")34!4 = !{}35!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)36!6 = !{i32 7, !"Dwarf Version", i32 5}37!7 = !{i32 2, !"Debug Info Version", i32 3}38!13 = !{i32 7, !"debug-info-assignment-tracking", i1 true}39!14 = !{!"clang version 17.0.0"}40!15 = distinct !DISubprogram(name: "fun", linkageName: "_Z3funi", scope: !3, file: !3, line: 2, type: !16, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)41!16 = !DISubroutineType(types: !17)42!17 = !{null, !5}43!18 = !{}44!20 = !DILocalVariable(name: "x", arg: 1, scope: !15, file: !3, line: 2, type: !5)45!21 = !DILocation(line: 0, scope: !15)46!23 = !DILocalVariable(name: "a", scope: !15, file: !3, line: 3, type: !5)47!27 = distinct !DIAssignID()48