Files
TheRock/compiler/amd-llvm/llvm/test/DebugInfo/MIR/X86/live-debug-values-restore-collide.mir
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

86 lines
3.3 KiB
YAML

# RUN: llc %s -o - -run-pass=livedebugvalues -mtriple=x86_64-unknown-unknown -experimental-debug-variable-locations=false | FileCheck %s
#
# This is a regression test for register/stack variable locations being
# interpreted as each other. We place a variable location on the stack, based
# on $rsp. We later make a memory load from $rsp. On faulty versions of LLVM
# this gets interpreted as a stack restore of the spilt value (it's not).
#
# Test that LiveDebugValues does not create any new variable locations.
#
# CHECK-LABEL: name: baaar
# CHECK-LABEL: bb.0.entry:
# CHECK: DBG_VALUE $r9d, $noreg, !{{[0-9]*}}, !DIExpression()
# CHECK: DBG_VALUE $rsp, 0, !{{[0-9]*}}, !DIExpression(DW_OP_plus_uconst, 16)
# CHECK-NOT: DBG_VALUE
--- |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define void @baaar() !dbg !4 {
entry:
ret void
}
!llvm.module.flags = !{!0, !1}
!llvm.dbg.cu = !{!2}
!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 2, !"Dwarf Version", i32 4}
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
!3 = !DIFile(filename: "sheep.cpp", directory: ".")
!4 = distinct !DISubprogram(name: "baaar", scope: !3, file: !3, line: 1, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = !{!9}
!9 = !DILocalVariable(name: "moo", scope: !4, file: !3, line: 1, type: !7)
!10 = !DILocation(line: 1, scope: !4)
...
---
name: baaar
alignment: 16
tracksRegLiveness: true
liveins:
- { reg: '$rdi', virtual-reg: '' }
- { reg: '$rsi', virtual-reg: '' }
- { reg: '$rdx', virtual-reg: '' }
- { reg: '$rcx', virtual-reg: '' }
- { reg: '$r8', virtual-reg: '' }
- { reg: '$r9d', virtual-reg: '' }
frameInfo:
stackSize: 24
offsetAdjustment: -24
maxAlignment: 8
adjustsStack: true
hasCalls: true
fixedStack:
stack:
- { id: 0, name: '', type: spill-slot, offset: -16, size: 8, alignment: 8,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
- { id: 1, name: '', type: spill-slot, offset: -32, size: 8, alignment: 8,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
body: |
bb.0.entry:
liveins: $rcx, $rdi, $rdx, $rsi, $r8, $r9d, $rbp, $r15, $r14, $r13, $r12, $rbx
; Setup
DBG_VALUE $r9d, $noreg, !9, !DIExpression(), debug-location !10
$rsp = frame-setup SUB64ri8 $rsp, 24, implicit-def dead $eflags
; Spill
MOV32mr $rsp, 1, $noreg, 16, $noreg, $r9d :: (store (s32) into %stack.0)
DBG_VALUE $rsp, 0, !9, !DIExpression(DW_OP_plus_uconst, 16), debug-location !10
; This load from the stack can be misinterpreted as a stack restore of
; any DBG_VALUe pointing at $rsp.
$rsi = MOV64rm $rsp, 1, $noreg, 0, $noreg :: (load (s64) from %stack.1)
; Return faff
$eax = MOV32ri 0
$rsp = frame-destroy ADD64ri8 $rsp, 24, implicit-def dead $eflags
RET64 debug-location !10
...