Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/Thumb/machine-cse-deadreg.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

105 lines
2.8 KiB
YAML

# RUN: llc -mtriple thumbv6m-arm-none-eabi -run-pass=machine-cse -verify-machineinstrs -o - %s | FileCheck %s
# RUN: llc -mtriple thumbv6m-arm-none-eabi -passes=machine-cse -o - %s | FileCheck %s
--- |
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv6m-arm-none-eabi"
define i32 @funca(i64 %l1) {
entry:
%l2 = icmp ult i64 %l1, -177673816660004267
%l3 = add i64 %l1, 401100203
%rem.i = select i1 %l2, i64 %l1, i64 %l3
%conv = trunc i64 %rem.i to i32
ret i32 %conv
}
define i32 @funcb(i64 %l1) { ret i32 0 }
...
---
name: funca
tracksRegLiveness: true
liveins:
- { reg: '$r0', virtual-reg: '%0' }
- { reg: '$r1', virtual-reg: '%1' }
constants:
- id: 0
value: i32 401100203
alignment: 4
isTargetSpecific: false
- id: 1
value: i32 41367909
alignment: 4
isTargetSpecific: false
body: |
bb.0.entry:
successors: %bb.1(0x40000000), %bb.2(0x40000000)
liveins: $r0, $r1
%1:tgpr = COPY $r1
%0:tgpr = COPY $r0
%2:tgpr = tLDRpci %const.0, 14, $noreg :: (load (s32) from constant-pool)
%3:tgpr, dead $cpsr = tADDrr %0, %2, 14, $noreg
%4:tgpr = tLDRpci %const.1, 14, $noreg :: (load (s32) from constant-pool)
%5:tgpr, $cpsr = tADDrr %0, %2, 14, $noreg
%6:tgpr, $cpsr = tADC %1, killed %4, 14, $noreg, implicit $cpsr
tBcc %bb.2, 3, $cpsr
bb.1.entry:
successors: %bb.2(0x80000000)
bb.2.entry:
%7:tgpr = PHI %3, %bb.1, %0, %bb.0
$r0 = COPY %7
tBX_RET 14, $noreg, implicit $r0
# CHECK-LABEL: name: funca
# cpsr def must not be dead
# CHECK: %3:tgpr, $cpsr = tADDrr %0, %2
# CHECK-NOT: %5:tgpr, $cpsr = tADDrr %0, %2
...
---
name: funcb
tracksRegLiveness: true
liveins:
- { reg: '$r0', virtual-reg: '%0' }
- { reg: '$r1', virtual-reg: '%1' }
constants:
- id: 0
value: i32 401100203
alignment: 4
isTargetSpecific: false
- id: 1
value: i32 41367909
alignment: 4
isTargetSpecific: false
body: |
bb.0:
successors: %bb.1(0x40000000), %bb.2(0x40000000)
liveins: $r0, $r1
%1:tgpr = COPY $r1
%0:tgpr = COPY $r0
%2:tgpr = tLDRpci %const.0, 14, $noreg :: (load (s32) from constant-pool)
%3:tgpr, dead $cpsr = tADDrr %0, %2, 14, $noreg
%4:tgpr = tLDRpci %const.1, 14, $noreg :: (load (s32) from constant-pool)
%5:tgpr, dead $cpsr = tADDrr %0, %2, 14, $noreg
%6:tgpr, $cpsr = tADDrr %1, killed %4, 14, $noreg
tBcc %bb.2, 3, $cpsr
bb.1:
successors: %bb.2(0x80000000)
bb.2:
%7:tgpr = PHI %3, %bb.1, %0, %bb.0
$r0 = COPY %7
tBX_RET 14, $noreg, implicit $r0
# CHECK-LABEL: name: funcb
# cpsr def should be dead
# CHECK: %3:tgpr, dead $cpsr = tADDrr %0, %2
# CHECK-NOT: %5:tgpr, dead $cpsr = tADDrr %0, %2
...