Files
TheRock/compiler/amd-llvm/llvm/test/DebugInfo/MIR/InstrRef/x86-fixup-bw-inst-subreb.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

69 lines
2.2 KiB
YAML

# RUN: llc -mtriple=x86_64-unknown-linux-gnu -run-pass x86-fixup-bw-insts %s -o - -experimental-debug-variable-locations | FileCheck %s
# RUN: llc -mtriple=x86_64-unknown-linux-gnu -passes="require<profile-summary>,function(machine-function(x86-fixup-bw-insts))" %s -o - -experimental-debug-variable-locations | FileCheck %s
#
# This test is a copy of llvm/test/CodeGen/X86/fixup-bw-inst.mir, with a few
# test bodies removed. The pass promotes certain register operations to be
# wider operations (such as loads and sign extensions), which has an instruction
# encoding benefit. New instructions are created, and so should have a debug
# instruction number substitution; but in addition a qualifiying subregister,
# because the newly def'd register is a different size to the old one.
#
# Plain copies that get transformed are not tested for, as they should never
# be instrumented. At a high level, copies do not define a value; they move
# them.
---
# CHECK-LABEL: name: test1
name: test1
alignment: 16
tracksRegLiveness: true
debugInstrRef: true
liveins:
- { reg: '$rax' }
# CHECK: debugValueSubstitutions:
# CHECK-NEXT - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 4 }
## Subreg 4 -> sub_16bit
body: |
bb.0:
liveins: $rax
$ax = MOV16rm killed $rax, 1, $noreg, 0, $noreg, debug-instr-number 1
; CHECK: $eax = MOVZX32rm16 killed $rax, {{.*}} debug-instr-number 2
RET64 $ax
...
---
# CHECK-LABEL: name: test3
name: test3
alignment: 16
tracksRegLiveness: true
debugInstrRef: true
liveins:
- { reg: '$rdi' }
# CHECK: debugValueSubstitutions:
# CHECK-NEXT - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 4 }
## Subreg 4 -> sub_16bit
body: |
bb.0:
successors: %bb.1(0x30000000), %bb.2(0x50000000)
liveins: $rdi
TEST64rr $rdi, $rdi, implicit-def $eflags
JCC_1 %bb.1, 4, implicit $eflags
bb.2:
liveins: $rdi
$ax = MOV16rm killed $rdi, 1, $noreg, 0, $noreg, implicit-def $eax, debug-instr-number 1
; CHECK: $eax = MOVZX32rm16 killed $rdi, {{.*}} debug-instr-number 2
$ax = KILL $ax, implicit killed $eax
RET64 $ax
bb.1:
$eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags
$ax = KILL $ax, implicit killed $eax
RET64 $ax
...