Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/PowerPC/livevars-crash1.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

131 lines
4.3 KiB
YAML

# RUN: llc -mtriple powerpc64le-unknown-linux-gnu %s -o - 2>&1 \
# RUN: -run-pass=livevars,phi-node-elimination -verify-machineinstrs | \
# RUN: FileCheck %s
# RUN: llc -mtriple powerpc64le-unknown-linux-gnu %s -o - 2>&1 \
# RUN: --passes='require<live-vars>,phi-node-elimination' -verify-each | \
# RUN: FileCheck %s
--- |
; Function Attrs: noreturn nounwind
define signext i32 @zext_free(ptr nocapture dereferenceable(8) %p) {
entry:
%.pre = load ptr, ptr %p, align 8
br label %loop
loop: ; preds = %loop, %if.then3, %entry
%0 = phi ptr [ %.pre, %entry ], [ %incdec.ptr4, %if.then3 ], [ %incdec.ptr, %loop ]
%1 = load i8, ptr %0, align 1
%tobool = icmp eq i8 %1, 0
%incdec.ptr = getelementptr inbounds i8, ptr %0, i64 1
store ptr %incdec.ptr, ptr %p, align 8
%2 = load i8, ptr %incdec.ptr, align 1
%tobool2 = icmp ne i8 %2, 0
%or.cond = and i1 %tobool, %tobool2
br i1 %or.cond, label %if.then3, label %loop
if.then3: ; preds = %loop
%incdec.ptr4 = getelementptr inbounds i8, ptr %0, i64 2
store ptr %incdec.ptr4, ptr %p, align 8
br label %loop
}
...
---
name: zext_free
tracksRegLiveness: true
registers:
- { id: 0, class: g8rc, preferred-register: '' }
- { id: 1, class: g8rc_and_g8rc_nox0, preferred-register: '' }
- { id: 2, class: g8rc, preferred-register: '' }
- { id: 3, class: g8rc, preferred-register: '' }
- { id: 4, class: g8rc_and_g8rc_nox0, preferred-register: '' }
- { id: 5, class: gprc, preferred-register: '' }
- { id: 6, class: crrc, preferred-register: '' }
- { id: 7, class: crbitrc, preferred-register: '' }
- { id: 8, class: gprc, preferred-register: '' }
- { id: 9, class: crrc, preferred-register: '' }
- { id: 10, class: crbitrc, preferred-register: '' }
- { id: 11, class: crbitrc, preferred-register: '' }
liveins:
- { reg: '$x3', virtual-reg: '%4' }
body: |
bb.0.entry:
successors: %bb.1(0x80000000)
liveins: $x3
%4:g8rc_and_g8rc_nox0 = COPY killed $x3
%0:g8rc = LD 0, %4 :: (dereferenceable load (s64) from %ir.p)
bb.1.loop:
successors: %bb.1(0x20000000), %bb.2(0x60000000)
%1:g8rc_and_g8rc_nox0 = PHI %0, %bb.0, %2, %bb.1, %3, %bb.3, %2, %bb.2
%5:gprc = LBZ 0, %1 :: (load (s8) from %ir.0)
%6:crrc = CMPWI killed %5, 0
%7:crbitrc = COPY killed %6.sub_eq
%2:g8rc = nuw ADDI8 %1, 1
STD %2, 0, %4 :: (store (s64) into %ir.p)
%8:gprc = LBZ 1, %1 :: (load (s8) from %ir.incdec.ptr)
BCn killed %7, %bb.1
B %bb.2
bb.2.loop:
successors: %bb.3(0x55555555), %bb.1(0x2aaaaaab)
%9:crrc = CMPWI killed %8, 0
%10:crbitrc = COPY killed %9.sub_eq
BC killed %10, %bb.1
B %bb.3
bb.3.if.then3:
successors: %bb.1(0x80000000)
%3:g8rc = nuw ADDI8 killed %1, 2
STD %3, 0, %4 :: (store (s64) into %ir.p)
B %bb.1
; CHECK-LABEL: name: zext_free
; CHECK: bb.0.entry:
; CHECK: successors: %bb.1(0x80000000)
; CHECK: liveins: $x3
; CHECK: %4:g8rc_and_g8rc_nox0 = COPY killed $x3
; CHECK: %0:g8rc = LD 0, %4 :: (dereferenceable load (s64) from %ir.p)
; CHECK: %12:g8rc_and_g8rc_nox0 = COPY killed %0
; CHECK: bb.1.loop:
; CHECK: successors: %bb.1(0x20000000), %bb.2(0x60000000)
; CHECK: %1:g8rc_and_g8rc_nox0 = COPY killed %12
; CHECK: %5:gprc = LBZ 0, %1 :: (load (s8) from %ir.0)
; CHECK: %6:crrc = CMPWI killed %5, 0
; CHEXK: %7:crbitrc = COPY killed %6.sub_eq
; CHECK: %2:g8rc = nuw ADDI8 %1, 1
; CHECK: STD %2, 0, %4 :: (store (s64) into %ir.p)
; CHECK: %8:gprc = LBZ 1, %1 :: (load (s8) from %ir.incdec.ptr)
; CHECK: %12:g8rc_and_g8rc_nox0 = COPY %2
; CHECK: BCn killed %7, %bb.1
; CHECK: B %bb.2
; CHECK: bb.2.loop:
; CHECK: successors: %bb.3(0x55555555), %bb.1(0x2aaaaaab)
; CHECK: %9:crrc = CMPWI killed %8, 0
; CHECK: %10:crbitrc = COPY killed %9.sub_eq
; CHECK: %12:g8rc_and_g8rc_nox0 = COPY killed %2
; CHECK: BC killed %10, %bb.1
; CHECK: B %bb.3
; CHECK: bb.3.if.then3:
; CHECK: successors: %bb.1(0x80000000)
; CHECK: %3:g8rc = nuw ADDI8 killed %1, 2
; CHECK: STD %3, 0, %4 :: (store (s64) into %ir.p)
; CHECK: %12:g8rc_and_g8rc_nox0 = COPY killed %3
; CHECK: B %bb.1
...