1; RUN: llc -mtriple i386 %s -stop-after=livedebugvalues -o - | FileCheck %s 2 3; There should be multiple debug values for this variable after regalloc. The 4; value has been spilled, but we shouldn't lose track of the location because 5; of this. 6 7; CHECK-COUNT-4: DBG_VALUE $ebp, 0, !6, !DIExpression(DW_OP_constu, 16, DW_OP_minus), debug-location !10 8 9define void @main(i32 %call, i32 %xor.i, i1 %tobool4.not, i32 %.pre) #0 !dbg !4 { 10entry: 11 %tobool1.not = icmp ne i32 %call, 0 12 %spec.select = zext i1 %tobool1.not to i32 13 br label %for.body5 14 15for.cond.loopexit.loopexit: ; preds = %for.body5 16 #dbg_value(i32 %spec.select, !6, !DIExpression(), !10) 17 %tobool.not.i53 = icmp eq i32 %spec.select, 0 18 br i1 %tobool.not.i53, label %transparent_crc.exit57, label %if.then.i54 19 20for.body5: ; preds = %for.body5, %entry 21 %0 = phi i32 [ 0, %entry ], [ %xor1.i40.i, %for.body5 ] 22 %xor6.i = xor i32 %.pre, %0 23 %shr7.i = ashr i32 %xor6.i, 1 24 %xor17.i = xor i32 %shr7.i, %call 25 %shr18.i = ashr i32 %xor17.i, 1 26 %xor.i.i = xor i32 %shr18.i, %xor.i 27 %arrayidx.i.i = getelementptr [0 x i32], ptr null, i32 0, i32 %xor.i.i 28 %xor1.i40.i = xor i32 %xor.i.i, %call 29 br i1 %tobool4.not, label %for.cond.loopexit.loopexit, label %for.body5 30 31if.then.i54: ; preds = %for.cond.loopexit.loopexit 32 store i64 0, ptr null, align 4 33 br label %transparent_crc.exit57 34 35transparent_crc.exit57: ; preds = %if.then.i54, %for.cond.loopexit.loopexit 36 ret void 37} 38 39attributes #0 = { "frame-pointer"="all" } 40 41!llvm.dbg.cu = !{!0} 42!llvm.module.flags = !{!3} 43 44!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 20.0.0git.prerel", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !2, splitDebugInlining: false, nameTableKind: None) 45!1 = !DIFile(filename: "xx.c", directory: "/path", checksumkind: CSK_MD5, checksum: "c4b2fc62bca9171ad484c91fb78b8842") 46!2 = !{} 47!3 = !{i32 2, !"Debug Info Version", i32 3} 48!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 20, type: !5, scopeLine: 20, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2) 49!5 = !DISubroutineType(types: !2) 50!6 = !DILocalVariable(name: "flag", arg: 2, scope: !7, file: !1, line: 8, type: !9) 51!7 = distinct !DISubprogram(name: "transparent_crc", scope: !1, file: !1, line: 8, type: !8, scopeLine: 8, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2) 52!8 = distinct !DISubroutineType(types: !2) 53!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 54!10 = !DILocation(line: 0, scope: !7, inlinedAt: !11) 55!11 = distinct !DILocation(line: 28, column: 3, scope: !4) 56