1a344c907SStephen Tozer# RUN: llc %s -o - -experimental-debug-variable-locations=true \ 2a344c907SStephen Tozer# RUN: -run-pass=livedebugvalues | \ 3a344c907SStephen Tozer# RUN: FileCheck %s --implicit-check-not=DBG_VALUE 4a344c907SStephen Tozer# 5a344c907SStephen Tozer## Check that LiveDebugValues can track and join DBG_INSTR_REFs that use 6a344c907SStephen Tozer## registers, stack slots, and constants in a single instruction. 7a344c907SStephen Tozer# 8a344c907SStephen Tozer# CHECK: ![[VAR_D:[0-9]+]] = !DILocalVariable(name: "d" 9a344c907SStephen Tozer 10a344c907SStephen Tozer# CHECK-LABEL: bb.0.entry 11a344c907SStephen Tozer# 12a344c907SStephen Tozer## Value at end of first block should use the registers given by DBG_PHI, and 13a344c907SStephen Tozer## fold the offset+deref from stack slot [$rsp+12] into the expression. 14a344c907SStephen Tozer# CHECK: DBG_VALUE_LIST ![[VAR_D]] 15a344c907SStephen Tozer# CHECK-SAME: !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus_uconst, 12, DW_OP_deref, DW_OP_plus, DW_OP_LLVM_arg, 3, DW_OP_minus, DW_OP_stack_value) 16a344c907SStephen Tozer# CHECK-SAME: $ebp, $rsp, $ebx, 6 17a344c907SStephen Tozer 18a344c907SStephen Tozer# CHECK-LABEL: bb.1.while.body 19a344c907SStephen Tozer# 20a344c907SStephen Tozer## Prior DBG_VALUE_LIST should be live-in to this bb.1. 21a344c907SStephen Tozer# CHECK: DBG_VALUE_LIST ![[VAR_D]] 22a344c907SStephen Tozer# CHECK-SAME: !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus_uconst, 12, DW_OP_deref, DW_OP_plus, DW_OP_LLVM_arg, 3, DW_OP_minus, DW_OP_stack_value) 23a344c907SStephen Tozer# CHECK-SAME: $ebp, $rsp, $ebx, 6 24a344c907SStephen Tozer# 25a344c907SStephen Tozer## When $ebp is spilled to a stack slot, a new debug value using the stack slot 26a344c907SStephen Tozer## should be inserted. 27a344c907SStephen Tozer# CHECK: MOV32mr $rsp, {{.+}} $ebp 28a344c907SStephen Tozer# CHECK-NEXT: DBG_VALUE_LIST ![[VAR_D]] 29a344c907SStephen Tozer# CHECK-SAME: !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_plus_uconst, 16, DW_OP_deref, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus_uconst, 12, DW_OP_deref, DW_OP_plus, DW_OP_LLVM_arg, 3, DW_OP_minus, DW_OP_stack_value) 30a344c907SStephen Tozer# CHECK-SAME: $rsp, $rsp, $ebx, 6 31a344c907SStephen Tozer# 32a344c907SStephen Tozer## Similarly produce a new debug value when $ebx is spilled. 33a344c907SStephen Tozer# CHECK: MOV32mr $rsp, {{.+}} $ebx 34a344c907SStephen Tozer# CHECK-NEXT: DBG_VALUE_LIST ![[VAR_D]] 35a344c907SStephen Tozer# CHECK-SAME: !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_plus_uconst, 16, DW_OP_deref, DW_OP_LLVM_arg, 2, DW_OP_plus_uconst, 20, DW_OP_deref, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus_uconst, 12, DW_OP_deref, DW_OP_plus, DW_OP_LLVM_arg, 3, DW_OP_minus, DW_OP_stack_value) 36a344c907SStephen Tozer# CHECK-SAME: $rsp, $rsp, $rsp, 6 37a344c907SStephen Tozer# 38a344c907SStephen Tozer## When the value in the stack slot is restored and then that slot is clobbered, the debug value should use the restored register. 39a344c907SStephen Tozer# CHECK: MOV32mi $rsp 40a344c907SStephen Tozer# CHECK-NEXT: DBG_VALUE_LIST ![[VAR_D]] 41a344c907SStephen Tozer# CHECK-SAME: !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_plus_uconst, 16, DW_OP_deref, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus_uconst, 12, DW_OP_deref, DW_OP_plus, DW_OP_LLVM_arg, 3, DW_OP_minus, DW_OP_stack_value) 42a344c907SStephen Tozer# CHECK-SAME: $rsp, $rsp, $ebx, 6 43a344c907SStephen Tozer# 44a344c907SStephen Tozer## Repeat for the next stack slot that gets restored and then clobbered. 45a344c907SStephen Tozer# CHECK: MOV32mi $rsp 46a344c907SStephen Tozer# CHECK-NEXT: DBG_VALUE_LIST ![[VAR_D]] 47a344c907SStephen Tozer# CHECK-SAME: !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus_uconst, 12, DW_OP_deref, DW_OP_plus, DW_OP_LLVM_arg, 3, DW_OP_minus, DW_OP_stack_value) 48a344c907SStephen Tozer# CHECK-SAME: $ebp, $rsp, $ebx, 6 49a344c907SStephen Tozer# 50a344c907SStephen Tozer## TODO: The debug value range should be terminated when the value in $ebx is clobbered. 51a344c907SStephen Tozer# 52a344c907SStephen Tozer## At the end of the block a new DBG_INSTR_REF begins a new range. 53a344c907SStephen Tozer# CHECK: DBG_VALUE_LIST ![[VAR_D]] 54a344c907SStephen Tozer# CHECK-SAME: !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus_uconst, 12, DW_OP_deref, DW_OP_plus, DW_OP_LLVM_arg, 3, DW_OP_minus, DW_OP_stack_value) 55a344c907SStephen Tozer# CHECK-SAME: $ebp, $rsp, $ebx, 6 56a344c907SStephen Tozer 57a344c907SStephen Tozer# CHECK-LABEL: bb.2.while.end 58a344c907SStephen Tozer# 59a344c907SStephen Tozer## Finally, the two entry debug values should be joined, as they have identical 60a344c907SStephen Tozer## expressions, their respective stack slots and constants are identical, and 61a344c907SStephen Tozer## the remaining operands occupy the same registers out of each block. 62a344c907SStephen Tozer# CHECK: DBG_VALUE_LIST ![[VAR_D]] 63a344c907SStephen Tozer# CHECK-SAME: !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus_uconst, 12, DW_OP_deref, DW_OP_plus, DW_OP_LLVM_arg, 3, DW_OP_minus, DW_OP_stack_value) 64a344c907SStephen Tozer# CHECK-SAME: $ebp, $rsp, $ebx, 6 65a344c907SStephen Tozer 66a344c907SStephen Tozer 67a344c907SStephen Tozer--- | 68a344c907SStephen Tozer 69a344c907SStephen Tozer ; ModuleID = 'test.ll' 70a344c907SStephen Tozer source_filename = "test.cpp" 71a344c907SStephen Tozer target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 72a344c907SStephen Tozer target triple = "x86_64-unknown-linux-gnu" 73a344c907SStephen Tozer 74a344c907SStephen Tozer ; Function Attrs: mustprogress uwtable 75a344c907SStephen Tozer define dso_local noundef i32 @_Z3fooii(i32 noundef %a, i32 noundef %b) local_unnamed_addr !dbg !9 { 76a344c907SStephen Tozer entry: 77a344c907SStephen Tozer %call = tail call noundef i32 @_Z3bazv(), !dbg !18 78a344c907SStephen Tozer call void @llvm.dbg.value(metadata !DIArgList(i32 %a, i32 %call, i32 %b), metadata !17, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_constu, 6, DW_OP_minus, DW_OP_stack_value)), !dbg !19 79a344c907SStephen Tozer %cmp19 = icmp sgt i32 %b, %a, !dbg !20 80a344c907SStephen Tozer br i1 %cmp19, label %while.body.preheader, label %while.end, !dbg !21 81a344c907SStephen Tozer 82a344c907SStephen Tozer while.body.preheader: ; preds = %entry 83a344c907SStephen Tozer br label %while.body, !dbg !21 84a344c907SStephen Tozer 85a344c907SStephen Tozer while.body: ; preds = %while.body.preheader, %while.body 86a344c907SStephen Tozer %a.addr.021 = phi i32 [ %mul3, %while.body ], [ %a, %while.body.preheader ] 87a344c907SStephen Tozer %b.addr.020 = phi i32 [ %add2, %while.body ], [ %b, %while.body.preheader ] 88a344c907SStephen Tozer %call1 = tail call noundef i32 @_Z3bazv(), !dbg !22 89a344c907SStephen Tozer tail call void asm sideeffect "", "~{rax},~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15},~{dirflag},~{fpsr},~{flags}"() #3, !dbg !24, !srcloc !25 90a344c907SStephen Tozer %add2 = add i32 %b.addr.020, 2, !dbg !26 91a344c907SStephen Tozer %mul3 = shl nsw i32 %a.addr.021, 1, !dbg !27 92a344c907SStephen Tozer call void @llvm.dbg.value(metadata !DIArgList(i32 %mul3, i32 %call, i32 %add2), metadata !17, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_constu, 6, DW_OP_minus, DW_OP_stack_value)), !dbg !19 93a344c907SStephen Tozer %cmp = icmp sgt i32 %add2, %mul3, !dbg !20 94a344c907SStephen Tozer br i1 %cmp, label %while.body, label %while.end, !dbg !21, !llvm.loop !28 95a344c907SStephen Tozer 96a344c907SStephen Tozer while.end: ; preds = %while.body, %entry 97a344c907SStephen Tozer %b.addr.0.lcssa = phi i32 [ %b, %entry ], [ %add2, %while.body ] 98a344c907SStephen Tozer %a.addr.0.lcssa = phi i32 [ %a, %entry ], [ %mul3, %while.body ] 99a344c907SStephen Tozer %add7 = sub i32 %b.addr.0.lcssa, %call, !dbg !31 100a344c907SStephen Tozer %sub8 = add i32 %add7, %a.addr.0.lcssa, !dbg !32 101a344c907SStephen Tozer ret i32 %sub8, !dbg !33 102a344c907SStephen Tozer } 103a344c907SStephen Tozer 104a344c907SStephen Tozer declare !dbg !34 noundef i32 @_Z3bazv() local_unnamed_addr 105a344c907SStephen Tozer 106a344c907SStephen Tozer ; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn 107a344c907SStephen Tozer declare void @llvm.dbg.value(metadata, metadata, metadata) 108a344c907SStephen Tozer 109a344c907SStephen Tozer !llvm.dbg.cu = !{!0} 110a344c907SStephen Tozer !llvm.module.flags = !{!2, !3, !4, !5, !6, !7} 111a344c907SStephen Tozer !llvm.ident = !{!8} 112a344c907SStephen Tozer 113a344c907SStephen Tozer !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 16.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) 114a344c907SStephen Tozer !1 = !DIFile(filename: "test.cpp", directory: "/") 115a344c907SStephen Tozer !2 = !{i32 7, !"Dwarf Version", i32 5} 116a344c907SStephen Tozer !3 = !{i32 2, !"Debug Info Version", i32 3} 117a344c907SStephen Tozer !4 = !{i32 1, !"wchar_size", i32 4} 118a344c907SStephen Tozer !5 = !{i32 8, !"PIC Level", i32 2} 119a344c907SStephen Tozer !6 = !{i32 7, !"PIE Level", i32 2} 120a344c907SStephen Tozer !7 = !{i32 7, !"uwtable", i32 2} 121a344c907SStephen Tozer !8 = !{!"clang version 16.0.0"} 122a344c907SStephen Tozer !9 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooii", scope: !1, file: !1, line: 3, type: !10, scopeLine: 3, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !13) 123a344c907SStephen Tozer !10 = !DISubroutineType(types: !11) 124a344c907SStephen Tozer !11 = !{!12, !12, !12} 125a344c907SStephen Tozer !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 126a344c907SStephen Tozer !13 = !{!14, !15, !16, !17} 127a344c907SStephen Tozer !14 = !DILocalVariable(name: "a", arg: 1, scope: !9, file: !1, line: 3, type: !12) 128a344c907SStephen Tozer !15 = !DILocalVariable(name: "b", arg: 2, scope: !9, file: !1, line: 3, type: !12) 129a344c907SStephen Tozer !16 = !DILocalVariable(name: "c", scope: !9, file: !1, line: 4, type: !12) 130a344c907SStephen Tozer !17 = !DILocalVariable(name: "d", scope: !9, file: !1, line: 5, type: !12) 131a344c907SStephen Tozer !18 = !DILocation(line: 4, column: 11, scope: !9) 132a344c907SStephen Tozer !19 = !DILocation(line: 0, scope: !9) 133a344c907SStephen Tozer !20 = !DILocation(line: 6, column: 12, scope: !9) 134a344c907SStephen Tozer !21 = !DILocation(line: 6, column: 3, scope: !9) 135a344c907SStephen Tozer !22 = !DILocation(line: 7, column: 5, scope: !23) 136a344c907SStephen Tozer !23 = distinct !DILexicalBlock(scope: !9, file: !1, line: 6, column: 17) 137a344c907SStephen Tozer !24 = !DILocation(line: 9, column: 5, scope: !23) 138a344c907SStephen Tozer !25 = !{i64 129} 139a344c907SStephen Tozer !26 = !DILocation(line: 8, column: 7, scope: !23) 140a344c907SStephen Tozer !27 = !DILocation(line: 10, column: 7, scope: !23) 141a344c907SStephen Tozer !28 = distinct !{!28, !21, !29, !30} 142a344c907SStephen Tozer !29 = !DILocation(line: 12, column: 3, scope: !9) 143a344c907SStephen Tozer !30 = !{!"llvm.loop.mustprogress"} 144a344c907SStephen Tozer !31 = !DILocation(line: 13, column: 12, scope: !9) 145a344c907SStephen Tozer !32 = !DILocation(line: 13, column: 16, scope: !9) 146a344c907SStephen Tozer !33 = !DILocation(line: 13, column: 3, scope: !9) 147a344c907SStephen Tozer !34 = !DISubprogram(name: "baz", linkageName: "_Z3bazv", scope: !1, file: !1, line: 1, type: !35, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !37) 148a344c907SStephen Tozer !35 = !DISubroutineType(types: !36) 149a344c907SStephen Tozer !36 = !{!12} 150a344c907SStephen Tozer !37 = !{} 151a344c907SStephen Tozer 152a344c907SStephen Tozer... 153a344c907SStephen Tozer--- 154a344c907SStephen Tozername: _Z3fooii 155a344c907SStephen Tozeralignment: 16 156a344c907SStephen TozertracksRegLiveness: true 157a344c907SStephen TozertracksDebugUserValues: true 158*9f854471SJeremy MorsedebugInstrRef: true 159a344c907SStephen Tozerregisters: [] 160a344c907SStephen Tozerliveins: 161a344c907SStephen Tozer - { reg: '$edi', virtual-reg: '' } 162a344c907SStephen Tozer - { reg: '$esi', virtual-reg: '' } 163a344c907SStephen TozerframeInfo: 164a344c907SStephen Tozer stackSize: 72 165a344c907SStephen Tozer offsetAdjustment: -72 166a344c907SStephen Tozer maxAlignment: 4 167a344c907SStephen Tozer adjustsStack: true 168a344c907SStephen Tozer hasCalls: true 169a344c907SStephen Tozer stackProtector: '' 170a344c907SStephen Tozer functionContext: '' 171a344c907SStephen Tozer cvBytesOfCalleeSavedRegisters: 48 172a344c907SStephen Tozer savePoint: '' 173a344c907SStephen Tozer restorePoint: '' 174a344c907SStephen TozerfixedStack: 175a344c907SStephen Tozer - { id: 0, type: spill-slot, offset: -56, size: 8, alignment: 8, stack-id: default, 176a344c907SStephen Tozer callee-saved-register: '$rbx', callee-saved-restored: true, debug-info-variable: '', 177a344c907SStephen Tozer debug-info-expression: '', debug-info-location: '' } 178a344c907SStephen Tozer - { id: 1, type: spill-slot, offset: -48, size: 8, alignment: 16, stack-id: default, 179a344c907SStephen Tozer callee-saved-register: '$r12', callee-saved-restored: true, debug-info-variable: '', 180a344c907SStephen Tozer debug-info-expression: '', debug-info-location: '' } 181a344c907SStephen Tozer - { id: 2, type: spill-slot, offset: -40, size: 8, alignment: 8, stack-id: default, 182a344c907SStephen Tozer callee-saved-register: '$r13', callee-saved-restored: true, debug-info-variable: '', 183a344c907SStephen Tozer debug-info-expression: '', debug-info-location: '' } 184a344c907SStephen Tozer - { id: 3, type: spill-slot, offset: -32, size: 8, alignment: 16, stack-id: default, 185a344c907SStephen Tozer callee-saved-register: '$r14', callee-saved-restored: true, debug-info-variable: '', 186a344c907SStephen Tozer debug-info-expression: '', debug-info-location: '' } 187a344c907SStephen Tozer - { id: 4, type: spill-slot, offset: -24, size: 8, alignment: 8, stack-id: default, 188a344c907SStephen Tozer callee-saved-register: '$r15', callee-saved-restored: true, debug-info-variable: '', 189a344c907SStephen Tozer debug-info-expression: '', debug-info-location: '' } 190a344c907SStephen Tozer - { id: 5, type: spill-slot, offset: -16, size: 8, alignment: 16, stack-id: default, 191a344c907SStephen Tozer callee-saved-register: '$rbp', callee-saved-restored: true, debug-info-variable: '', 192a344c907SStephen Tozer debug-info-expression: '', debug-info-location: '' } 193a344c907SStephen Tozerstack: 194a344c907SStephen Tozer - { id: 0, name: '', type: spill-slot, offset: -60, size: 4, alignment: 4, 195a344c907SStephen Tozer stack-id: default, callee-saved-register: '', callee-saved-restored: true, 196a344c907SStephen Tozer debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 197a344c907SStephen Tozer - { id: 1, name: '', type: spill-slot, offset: -64, size: 4, alignment: 4, 198a344c907SStephen Tozer stack-id: default, callee-saved-register: '', callee-saved-restored: true, 199a344c907SStephen Tozer debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 200a344c907SStephen Tozer - { id: 2, name: '', type: spill-slot, offset: -68, size: 4, alignment: 4, 201a344c907SStephen Tozer stack-id: default, callee-saved-register: '', callee-saved-restored: true, 202a344c907SStephen Tozer debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 203a344c907SStephen TozercallSites: [] 204a344c907SStephen TozerdebugValueSubstitutions: [] 205a344c907SStephen Tozerconstants: [] 206a344c907SStephen TozermachineFunctionInfo: {} 207a344c907SStephen Tozerbody: | 208a344c907SStephen Tozer bb.0.entry: 209a344c907SStephen Tozer successors: %bb.1(0x78e38e39), %bb.3(0x071c71c7) 210a344c907SStephen Tozer liveins: $edi, $esi, $rbp, $r15, $r14, $r13, $r12, $rbx 211a344c907SStephen Tozer 212a344c907SStephen Tozer frame-setup PUSH64r killed $rbp, implicit-def $rsp, implicit $rsp 213a344c907SStephen Tozer frame-setup CFI_INSTRUCTION def_cfa_offset 16 214a344c907SStephen Tozer frame-setup PUSH64r killed $r15, implicit-def $rsp, implicit $rsp 215a344c907SStephen Tozer frame-setup CFI_INSTRUCTION def_cfa_offset 24 216a344c907SStephen Tozer frame-setup PUSH64r killed $r14, implicit-def $rsp, implicit $rsp 217a344c907SStephen Tozer frame-setup CFI_INSTRUCTION def_cfa_offset 32 218a344c907SStephen Tozer frame-setup PUSH64r killed $r13, implicit-def $rsp, implicit $rsp 219a344c907SStephen Tozer frame-setup CFI_INSTRUCTION def_cfa_offset 40 220a344c907SStephen Tozer frame-setup PUSH64r killed $r12, implicit-def $rsp, implicit $rsp 221a344c907SStephen Tozer frame-setup CFI_INSTRUCTION def_cfa_offset 48 222a344c907SStephen Tozer frame-setup PUSH64r killed $rbx, implicit-def $rsp, implicit $rsp 223a344c907SStephen Tozer frame-setup CFI_INSTRUCTION def_cfa_offset 56 224a344c907SStephen Tozer $rsp = frame-setup SUB64ri8 $rsp, 24, implicit-def dead $eflags 225a344c907SStephen Tozer frame-setup CFI_INSTRUCTION def_cfa_offset 80 226a344c907SStephen Tozer CFI_INSTRUCTION offset $rbx, -56 227a344c907SStephen Tozer CFI_INSTRUCTION offset $r12, -48 228a344c907SStephen Tozer CFI_INSTRUCTION offset $r13, -40 229a344c907SStephen Tozer CFI_INSTRUCTION offset $r14, -32 230a344c907SStephen Tozer CFI_INSTRUCTION offset $r15, -24 231a344c907SStephen Tozer CFI_INSTRUCTION offset $rbp, -16 232a344c907SStephen Tozer DBG_PHI $esi, 5 233a344c907SStephen Tozer DBG_PHI $edi, 3 234a344c907SStephen Tozer $ebx = MOV32rr $esi 235a344c907SStephen Tozer $ebp = MOV32rr $edi 236a344c907SStephen Tozer CALL64pcrel32 target-flags(x86-plt) @_Z3bazv, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp, implicit-def $eax, debug-instr-number 4, debug-location !18 237a344c907SStephen Tozer MOV32mr $rsp, 1, $noreg, 12, $noreg, $eax :: (store (s32) into %stack.2) 238a344c907SStephen Tozer DBG_INSTR_REF !17, !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_LLVM_arg, 3, DW_OP_minus, DW_OP_stack_value), dbg-instr-ref(3, 0), dbg-instr-ref(4, 6), dbg-instr-ref(5, 0), 6, debug-location !19 239a344c907SStephen Tozer CMP32rr renamable $ebx, renamable $ebp, implicit-def $eflags, debug-location !20 240a344c907SStephen Tozer JCC_1 %bb.3, 14, implicit $eflags, debug-location !21 241a344c907SStephen Tozer 242a344c907SStephen Tozer bb.1.while.body (align 16): 243a344c907SStephen Tozer successors: %bb.1(0x78e38e39), %bb.3(0x071c71c7) 244a344c907SStephen Tozer liveins: $ebp, $ebx 245a344c907SStephen Tozer 246a344c907SStephen Tozer MOV32mr $rsp, 1, $noreg, 16, $noreg, killed renamable $ebp :: (store (s32) into %stack.1) 247a344c907SStephen Tozer MOV32mr $rsp, 1, $noreg, 20, $noreg, killed renamable $ebx :: (store (s32) into %stack.0) 248a344c907SStephen Tozer CALL64pcrel32 target-flags(x86-plt) @_Z3bazv, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax, debug-location !22 249a344c907SStephen Tozer INLINEASM &"", 1 /* sideeffect attdialect */, 12 /* clobber */, implicit-def dead early-clobber $rax, 12 /* clobber */, implicit-def dead early-clobber $rbx, 12 /* clobber */, implicit-def dead early-clobber $rcx, 12 /* clobber */, implicit-def dead early-clobber $rdx, 12 /* clobber */, implicit-def dead early-clobber $rsi, 12 /* clobber */, implicit-def dead early-clobber $rdi, 12 /* clobber */, implicit-def dead early-clobber $rbp, 12 /* clobber */, implicit-def dead early-clobber $r8, 12 /* clobber */, implicit-def dead early-clobber $r9, 12 /* clobber */, implicit-def dead early-clobber $r10, 12 /* clobber */, implicit-def dead early-clobber $r11, 12 /* clobber */, implicit-def dead early-clobber $r12, 12 /* clobber */, implicit-def dead early-clobber $r13, 12 /* clobber */, implicit-def dead early-clobber $r14, 12 /* clobber */, implicit-def dead early-clobber $r15, 12 /* clobber */, implicit-def dead early-clobber $df, 12 /* clobber */, implicit-def early-clobber $fpsw, 12 /* clobber */, implicit-def dead early-clobber $eflags, !25, debug-location !24 250a344c907SStephen Tozer renamable $ebp = MOV32rm $rsp, 1, $noreg, 16, $noreg :: (load (s32) from %stack.1) 251a344c907SStephen Tozer renamable $ebx = MOV32rm $rsp, 1, $noreg, 20, $noreg :: (load (s32) from %stack.0) 252a344c907SStephen Tozer MOV32mi $rsp, 1, $noreg, 20, $noreg, 0 :: (store (s32) into %stack.0) 253a344c907SStephen Tozer MOV32mi $rsp, 1, $noreg, 16, $noreg, 0 :: (store (s32) into %stack.1) 254a344c907SStephen Tozer renamable $ebx = ADD32ri8 killed renamable $ebx, 2, implicit-def dead $eflags, debug-instr-number 2, debug-location !26 255a344c907SStephen Tozer renamable $ebp = nsw ADD32rr killed renamable $ebp, renamable $ebp, implicit-def dead $eflags, debug-instr-number 1, debug-location !27 256a344c907SStephen Tozer DBG_INSTR_REF !17, !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 2, DW_OP_mul, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_LLVM_arg, 3, DW_OP_minus, DW_OP_stack_value), dbg-instr-ref(1, 0), dbg-instr-ref(4, 6), dbg-instr-ref(2, 0), 6, debug-location !19 257a344c907SStephen Tozer CMP32rr renamable $ebx, renamable $ebp, implicit-def $eflags, debug-location !20 258a344c907SStephen Tozer JCC_1 %bb.1, 15, implicit $eflags, debug-location !21 259a344c907SStephen Tozer 260a344c907SStephen Tozer bb.3.while.end: 261a344c907SStephen Tozer liveins: $ebp, $ebx 262a344c907SStephen Tozer 263a344c907SStephen Tozer renamable $ebx = SUB32rm killed renamable $ebx, $rsp, 1, $noreg, 12, $noreg, implicit-def dead $eflags, debug-location !31 :: (load (s32) from %stack.2) 264a344c907SStephen Tozer renamable $ebx = ADD32rr killed renamable $ebx, killed renamable $ebp, implicit-def dead $eflags, debug-location !32 265a344c907SStephen Tozer $eax = MOV32rr killed $ebx, debug-location !33 266a344c907SStephen Tozer $rsp = frame-destroy ADD64ri8 $rsp, 24, implicit-def dead $eflags, debug-location !33 267a344c907SStephen Tozer frame-destroy CFI_INSTRUCTION def_cfa_offset 56, debug-location !33 268a344c907SStephen Tozer $rbx = frame-destroy POP64r implicit-def $rsp, implicit $rsp, debug-location !33 269a344c907SStephen Tozer frame-destroy CFI_INSTRUCTION def_cfa_offset 48, debug-location !33 270a344c907SStephen Tozer $r12 = frame-destroy POP64r implicit-def $rsp, implicit $rsp, debug-location !33 271a344c907SStephen Tozer frame-destroy CFI_INSTRUCTION def_cfa_offset 40, debug-location !33 272a344c907SStephen Tozer $r13 = frame-destroy POP64r implicit-def $rsp, implicit $rsp, debug-location !33 273a344c907SStephen Tozer frame-destroy CFI_INSTRUCTION def_cfa_offset 32, debug-location !33 274a344c907SStephen Tozer $r14 = frame-destroy POP64r implicit-def $rsp, implicit $rsp, debug-location !33 275a344c907SStephen Tozer frame-destroy CFI_INSTRUCTION def_cfa_offset 24, debug-location !33 276a344c907SStephen Tozer $r15 = frame-destroy POP64r implicit-def $rsp, implicit $rsp, debug-location !33 277a344c907SStephen Tozer frame-destroy CFI_INSTRUCTION def_cfa_offset 16, debug-location !33 278a344c907SStephen Tozer $rbp = frame-destroy POP64r implicit-def $rsp, implicit $rsp, debug-location !33 279a344c907SStephen Tozer frame-destroy CFI_INSTRUCTION def_cfa_offset 8, debug-location !33 280a344c907SStephen Tozer RET64 $eax, debug-location !33 281a344c907SStephen Tozer 282a344c907SStephen Tozer... 283