Files
TheRock/compiler/amd-llvm/llvm/test/tools/llvm-reduce/mir/preserve-mem-operands.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

85 lines
3.9 KiB
YAML

# REQUIRES: amdgpu-registered-target
# RUN: llvm-reduce -abort-on-invalid-reduction -simplify-mir --delta-passes=instructions -mtriple=amdgcn-amd-amdhsa --test FileCheck --test-arg --check-prefix=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2> %t.log
# RUN: FileCheck --match-full-lines --check-prefix=RESULT %s < %t
# CHECK-INTERESTINGNESS: G_LOAD
# CHECK-INTERESTINGNESS: G_LOAD
# CHECK-INTERESTINGNESS: G_LOAD
# CHECK-INTERESTINGNESS: G_LOAD
# CHECK-INTERESTINGNESS: G_STORE
# CHECK-INTERESTINGNESS: G_STORE
# CHECK-INTERESTINGNESS: G_STORE
# CHECK-INTERESTINGNESS: G_LOAD
# CHECK-INTERESTINGNESS: G_LOAD
# CHECK-INTERESTINGNESS: G_LOAD
# CHECK-INTERESTINGNESS: G_LOAD
# CHECK-INTERESTINGNESS: G_STORE
# CHECK-INTERESTINGNESS: G_STORE
# RESULT: %{{[0-9]+}}:_(<2 x s16>) = G_LOAD %{{[0-9]+}}(p1) :: (load (<2 x s16>) from %ir.argptr0, align 32, addrspace 1)
# RESULT: %{{[0-9]+}}:_(<2 x s32>) = G_LOAD %{{[0-9]+}}(p1) :: (load (<2 x s32>) from %ir.argptr1, addrspace 3)
# RESULT: %{{[0-9]+}}:_(<2 x s32>) = G_LOAD %{{[0-9]+}}(p1) :: (load (<2 x s32>) from %ir.argptr1 + 8, addrspace 3)
# RESULT: %{{[0-9]+}}:_(<2 x s32>) = G_LOAD %{{[0-9]+}}(p1) :: (load (<2 x s32>) from %ir.argptr1 + 12, align 4, basealign 8, addrspace 3)
# RESULT: G_STORE %{{[0-9]+}}(<2 x s32>), %{{[0-9]+}}(p3) :: (store (<2 x s32>) into %fixed-stack.0, addrspace 5)
# RESULT: G_STORE %{{[0-9]+}}(<2 x s32>), %{{[0-9]+}}(p3) :: (store (<2 x s32>) into %stack.0, addrspace 5)
# RESULT: G_STORE %{{[0-9]+}}(p3), %{{[0-9]+}}(p3) :: (store (p3), addrspace 5)
# RESULT: %{{[0-9]+}}:_(s32) = G_LOAD %{{[0-9]+}}(p0) :: (load (s32) from call-entry @foo, addrspace 4)
# RESULT: %{{[0-9]+}}:_(s32) = G_LOAD %{{[0-9]+}}(p1) :: (load (s32) from constant-pool, addrspace 1)
# RESULT: %{{[0-9]+}}:_(p1) = G_LOAD %{{[0-9]+}}(p0) :: (load (p1) from got, addrspace 4)
# RESULT: %{{[0-9]+}}:_(p1) = G_LOAD %{{[0-9]+}}(p0) :: (load (p1) from jump-table, addrspace 4)
# RESULT: G_STORE %{{[0-9]+}}(<3 x s32>), %{{[0-9]+}}(p5) :: (store (<3 x s32>) into stack, align 8, addrspace 5)
# RESULT: G_STORE %{{[0-9]+}}(<3 x s32>), %{{[0-9]+}}(p5) :: (store (<3 x s32>) into stack + 12, align 4, basealign 8, addrspace 5)
--- |
declare i32 @foo(i32)
define void @func(<2 x i16> addrspace(1)* %argptr0, <2 x i32> addrspace(3)* %argptr1) {
ret void
}
...
---
name: func
tracksRegLiveness: true
fixedStack:
- { id: 0, offset: 16, size: 8, alignment: 4 }
stack:
- { id: 0, size: 4, alignment: 16 }
body: |
bb.0:
S_WAITCNT 0
S_NOP 0
%0:_(p1) = G_IMPLICIT_DEF
%1:_(<2 x s16>) = G_LOAD %0 :: (load (<2 x s16>) from %ir.argptr0, align 32, addrspace 1)
%2:_(<2 x s32>) = G_ZEXT %1
%3:_(<2 x s32>) = G_LOAD %0 :: (load (<2 x s32>) from %ir.argptr1, addrspace 3)
%4:_(<2 x s32>) = G_LOAD %0 :: (load (<2 x s32>) from %ir.argptr1 + 8, addrspace 3)
%5:_(<2 x s32>) = G_LOAD %0 :: (load (<2 x s32>) from %ir.argptr1 + 12, addrspace 3)
%6:_(<2 x s32>) = G_ADD %2, %3
%7:_(<2 x s32>) = G_ADD %6, %4
%8:_(<2 x s32>) = G_ADD %7, %5
%9:_(p3) = G_IMPLICIT_DEF
G_STORE %8, %9 :: (store (<2 x s32>) into %fixed-stack.0, addrspace 5)
G_STORE %8, %9 :: (store (<2 x s32>) into %stack.0, addrspace 5)
; Check address space, no value
G_STORE %9, %9 :: (store (p3), addrspace 5)
%10:_(p0) = G_IMPLICIT_DEF
%11:_(s32) = G_LOAD %10 :: (load (s32) from call-entry @foo, addrspace 4)
%12:_(s32) = G_LOAD %0 :: (load (s32) from constant-pool, addrspace 1)
%13:_(p1) = G_LOAD %10 :: (load (p1) from got, addrspace 4)
%14:_(p1) = G_LOAD %10 :: (load (p1) from jump-table, addrspace 4)
%15:_(<3 x s32>) = G_IMPLICIT_DEF
%16:_(p5) = G_IMPLICIT_DEF
G_STORE %15, %16 :: (store (<3 x s32>) into stack, align 8, addrspace 5)
G_STORE %15, %16 :: (store (<3 x s32>) into stack + 12, basealign 8, addrspace 5)
S_ENDPGM 0, implicit %10, implicit %12, implicit %13, implicit %14
...