Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/X86/coalescer-implicit-def-regression.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

92 lines
2.2 KiB
YAML

# RUN: llc -mtriple=x86_64-unknown-linux-gnu -run-pass=register-coalescer -o - %s
# An implicit-def will be added to SUBREG_TO_REG during coalescing
---
name: rematerialize_subreg_to_reg_added_impdef_0
tracksRegLiveness: true
body: |
bb.0:
successors: %bb.1(0x2aaaaaab), %bb.2(0x55555555)
liveins: $edi
%0:gr32 = MOV32r0 implicit-def dead $eflags
%1:gr8 = COPY %0.sub_8bit
%2:gr64 = SUBREG_TO_REG killed %0, %subreg.sub_32bit
JCC_1 %bb.2, 5, implicit killed undef $eflags
bb.1:
%4:gr8 = COPY %1
%5:gr8 = COPY killed undef %1
JMP_1 %bb.5
bb.2:
%6:gr64 = IMPLICIT_DEF
%2:gr64 = COPY killed %6
%5:gr8 = MOV8ri 1
bb.5:
successors: %bb.6(0x30000000), %bb.7(0x50000000)
TEST8rr killed undef %5, %5, implicit-def $eflags
JCC_1 %bb.7, 5, implicit killed undef $eflags
bb.6:
$al = COPY killed %1
RET 0, killed undef $al
bb.7:
MOV64mr undef $noreg, 1, undef $noreg, 0, undef $noreg, killed %2 :: (store (s64))
RET 0, killed undef $al
...
# Reduced version of previous with the SUBREG_TO_REG already folded
# away.
#
# The mov32r0 defines a subregister and has an implicit-def of the
# super register. After coalescing, the full register implicit def of
# %2 becomes a different subregister def.
---
name: rematerialize_subreg_to_reg_coalesces_to_subreg_impdef
tracksRegLiveness: true
body: |
bb.0:
successors: %bb.1(0x2aaaaaab), %bb.2(0x55555555)
liveins: $edi
undef %2.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags, implicit-def %2
%1:gr8 = COPY %2.sub_8bit
JCC_1 %bb.2, 5, implicit killed undef $eflags
bb.1:
successors: %bb.3(0x80000000)
dead %3:gr8 = COPY %1
%4:gr8 = COPY undef %1
JMP_1 %bb.3
bb.2:
successors: %bb.3(0x80000000)
%5:gr64 = IMPLICIT_DEF
%2:gr64_with_sub_8bit = COPY %5
%4:gr8 = MOV8ri 1
bb.3:
successors: %bb.4(0x30000000), %bb.5(0x50000000)
TEST8rr undef %4, %4, implicit-def $eflags
JCC_1 %bb.5, 5, implicit killed undef $eflags
bb.4:
$al = COPY %1
RET 0, killed undef $al
bb.5:
MOV64mr undef $noreg, 1, undef $noreg, 0, undef $noreg, %2 :: (store (s64))
RET 0, killed undef $al
...