Files
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

346 lines
7.4 KiB
YAML

# RUN: llc -ppc-asm-full-reg-names -mtriple=powerpc-ibm-aix-xcoff \
# RUN: -run-pass=ppc-ctrloops %s -o - -verify-machineinstrs | FileCheck %s
---
name: test_success1
# CHECK: test_success1
tracksRegLiveness: true
body: |
bb.0.entry:
%0:gprc = LI 2048
; CHECK: MTCTRloop
; CHECK: BDNZ
; CHECK-NOT: ADDI
; CHECK-NOT: CMPLWI
; CHECK-NOT: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
bb.1:
%1:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %1:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_fail_clobber
# CHECK: test_fail_clobber
tracksRegLiveness: true
body: |
bb.0.entry:
%0:gprc = LI 2048
; CHECK-NOT: MTCTRloop
; CHECK-NOT: BDNZ
; CHECK: ADDI
; CHECK: CMPLWI
; CHECK: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
bb.1:
INLINEASM &"", sideeffect attdialect, clobber, implicit-def early-clobber $ctr
%1:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %1:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_fail_use_in_loop
# CHECK: test_fail_use_in_loop
tracksRegLiveness: true
body: |
bb.0.entry:
%0:gprc = LI 2048
; CHECK-NOT: MTCTRloop
; CHECK-NOT: BDNZ
; CHECK: ADDI
; CHECK: CMPLWI
; CHECK: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
bb.1:
%1:gprc = MFCTR implicit $ctr
%2:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %2:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_fail_call_in_preheader_after_mtctr
# CHECK: test_fail_call_in_preheader_after_mtctr
tracksRegLiveness: true
body: |
bb.0.entry:
%0:gprc = LI 2048
; CHECK-NOT: MTCTR
; CHECK-NOT: BDNZ
; CHECK: ADDI
; CHECK: CMPLWI
; CHECK: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
BL @test_fail_use_in_loop, csr_aix32, implicit-def dead $lr, implicit $rm
bb.1:
%1:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %1:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_succ_call_in_preheader_before_mtctr
# CHECK: test_succ_call_in_preheader_before_mtctr
tracksRegLiveness: true
body: |
bb.0.entry:
%0:gprc = LI 2048
BL @test_fail_use_in_loop, csr_aix32, implicit-def dead $lr, implicit $rm
; CHECK: MTCTR
; CHECK: BDNZ
; CHECK-NOT: ADDI
; CHECK-NOT: CMPLWI
; CHECK-NOT: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
bb.1:
%1:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %1:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_fail_call_in_loop
# CHECK: test_fail_call_in_loop
tracksRegLiveness: true
body: |
bb.0.entry:
%0:gprc = LI 2048
; CHECK-NOT: MTCTR
; CHECK-NOT: BDNZ
; CHECK: ADDI
; CHECK: CMPLWI
; CHECK: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
bb.1:
BL @test_fail_use_in_loop, csr_aix32, implicit-def dead $lr, implicit $rm
%1:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %1:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_fail_indirect_call_in_loop
# CHECK: test_fail_indirect_call_in_loop
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r3, $r4
%0:gprc = LI 2048
; CHECK-NOT: MTCTR
; CHECK-NOT: BDNZ
; CHECK: ADDI
; CHECK: CMPLWI
; CHECK: BC
renamable %1:crrc = CMPLW killed renamable $r3, killed renamable $r4
renamable %2:crbitrc = COPY %1.sub_gt
MTLR %0:gprc, implicit-def $lr
MTCTRloop %0:gprc, implicit-def dead $ctr
bb.1:
BCLRL renamable %2, implicit $lr, implicit $rm
%3:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %3:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_fail_livein_preheader
# CHECK: test_fail_livein_preheader
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $ctr
%0:gprc = LI 2048
; CHECK-NOT: MTCTRloop
; CHECK-NOT: BDNZ
; CHECK: ADDI
; CHECK: CMPLWI
; CHECK: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
bb.1:
%1:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %1:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_fail_def_preheader
# CHECK: test_fail_def_preheader
tracksRegLiveness: true
body: |
bb.0.entry:
INLINEASM &"", sideeffect attdialect, clobber, implicit-def early-clobber $ctr
%0:gprc = LI 2048
; CHECK-NOT: MTCTRloop
; CHECK-NOT: BDNZ
; CHECK: ADDI
; CHECK: CMPLWI
; CHECK: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
bb.1:
%1:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %1:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_success_only_use_preheader
# CHECK: test_success_only_use_preheader
tracksRegLiveness: true
body: |
bb.0.entry:
%0:gprc = MFCTR implicit $ctr
%1:gprc = LI 2048
; CHECK: MTCTRloop
; CHECK: BDNZ
; CHECK-NOT: ADDI
; CHECK-NOT: CMPLWI
; CHECK-NOT: BC
MTCTRloop killed %1:gprc, implicit-def dead $ctr
bb.1:
%2:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %2:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_fail_use_after_mtctr
# CHECK: test_fail_use_after_mtctr
tracksRegLiveness: true
body: |
bb.0.entry:
%0:gprc = LI 2048
; CHECK-NOT: MTCTRloop
; CHECK-NOT: BDNZ
; CHECK: ADDI
; CHECK: CMPLWI
; CHECK: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
%1:gprc = MFCTR implicit $ctr
bb.1:
%2:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %2:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_fail_def_after_mtctr
# CHECK: test_fail_def_after_mtctr
tracksRegLiveness: true
body: |
bb.0.entry:
%0:gprc = LI 2048
; CHECK-NOT: MTCTRloop
; CHECK-NOT: BDNZ
; CHECK: ADDI
; CHECK: CMPLWI
; CHECK: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
INLINEASM &"", sideeffect attdialect, clobber, implicit-def early-clobber $ctr
bb.1:
%2:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %2:crbitrc, %bb.1
B %bb.2
bb.2:
BLR implicit $lr, implicit $rm
...
---
name: test_success_def_after_loop
# CHECK: test_success_def_after_loop
tracksRegLiveness: true
body: |
bb.0.entry:
%0:gprc = LI 2048
; CHECK: MTCTRloop
; CHECK: BDNZ
; CHECK-NOT: ADDI
; CHECK-NOT: CMPLWI
; CHECK-NOT: BC
MTCTRloop killed %0:gprc, implicit-def dead $ctr
bb.1:
%2:crbitrc = DecreaseCTRloop 1, implicit-def dead $ctr, implicit $ctr
BC killed %2:crbitrc, %bb.1
B %bb.2
bb.2:
INLINEASM &"", sideeffect attdialect, clobber, implicit-def early-clobber $ctr
BLR implicit $lr, implicit $rm
...