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
70 lines
3.0 KiB
LLVM
70 lines
3.0 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
; RUN: llc -global-isel -mtriple=arm64-windows -stop-after=irtranslator -o - %s | FileCheck %s
|
|
|
|
define void @local_escape() {
|
|
; CHECK-LABEL: name: local_escape
|
|
; CHECK: bb.1 (%ir-block.0):
|
|
; CHECK-NEXT: LOCAL_ESCAPE <mcsymbol .Llocal_escape$frame_escape_1>, %stack.1.b
|
|
; CHECK-NEXT: LOCAL_ESCAPE <mcsymbol .Llocal_escape$frame_escape_0>, %stack.0.a
|
|
; CHECK-NEXT: [[C:%[0-9]+]]:_(i32) = G_CONSTANT i32 42
|
|
; CHECK-NEXT: [[C1:%[0-9]+]]:_(i32) = G_CONSTANT i32 13
|
|
; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.a
|
|
; CHECK-NEXT: [[FRAME_INDEX1:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.1.b
|
|
; CHECK-NEXT: G_STORE [[C]](i32), [[FRAME_INDEX]](p0) :: (store (i32) into %ir.a)
|
|
; CHECK-NEXT: G_STORE [[C1]](i32), [[FRAME_INDEX1]](p0) :: (store (i32) into %ir.b)
|
|
; CHECK-NEXT: RET_ReallyLR
|
|
%a = alloca i32
|
|
%b = alloca i32, i32 2
|
|
call void (...) @llvm.localescape(ptr %a, ptr %b)
|
|
store i32 42, ptr %a
|
|
store i32 13, ptr %b
|
|
ret void
|
|
}
|
|
|
|
; Try some instructions before the localescape, and use a null
|
|
define void @local_escape_insert_point() {
|
|
; CHECK-LABEL: name: local_escape_insert_point
|
|
; CHECK: bb.1 (%ir-block.0):
|
|
; CHECK-NEXT: LOCAL_ESCAPE <mcsymbol .Llocal_escape_insert_point$frame_escape_2>, %stack.1.b
|
|
; CHECK-NEXT: LOCAL_ESCAPE <mcsymbol .Llocal_escape_insert_point$frame_escape_0>, %stack.0.a
|
|
; CHECK-NEXT: [[C:%[0-9]+]]:_(i32) = G_CONSTANT i32 42
|
|
; CHECK-NEXT: [[C1:%[0-9]+]]:_(i32) = G_CONSTANT i32 13
|
|
; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.a
|
|
; CHECK-NEXT: [[FRAME_INDEX1:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.1.b
|
|
; CHECK-NEXT: G_STORE [[C]](i32), [[FRAME_INDEX]](p0) :: (store (i32) into %ir.a)
|
|
; CHECK-NEXT: G_STORE [[C1]](i32), [[FRAME_INDEX1]](p0) :: (store (i32) into %ir.b)
|
|
; CHECK-NEXT: RET_ReallyLR
|
|
%a = alloca i32
|
|
%b = alloca i32, i32 2
|
|
store i32 42, ptr %a
|
|
store i32 13, ptr %b
|
|
call void (...) @llvm.localescape(ptr %a, ptr null, ptr %b)
|
|
ret void
|
|
}
|
|
|
|
declare void @foo(ptr)
|
|
|
|
; Check a cast of an alloca
|
|
define void @local_escape_strip_ptr_cast() {
|
|
; CHECK-LABEL: name: local_escape_strip_ptr_cast
|
|
; CHECK: bb.1 (%ir-block.0):
|
|
; CHECK-NEXT: LOCAL_ESCAPE <mcsymbol .Llocal_escape_strip_ptr_cast$frame_escape_0>, %stack.0.a
|
|
; CHECK-NEXT: [[C:%[0-9]+]]:_(i32) = G_CONSTANT i32 42
|
|
; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.a
|
|
; CHECK-NEXT: G_STORE [[C]](i32), [[FRAME_INDEX]](p0) :: (store (i32) into %ir.a)
|
|
; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
|
|
; CHECK-NEXT: $x0 = COPY [[FRAME_INDEX]](p0)
|
|
; CHECK-NEXT: BL @foo, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $x0
|
|
; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
|
|
; CHECK-NEXT: RET_ReallyLR
|
|
%a = alloca [128 x i32]
|
|
store i32 42, ptr %a
|
|
call void (...) @llvm.localescape(ptr %a, ptr null)
|
|
call void @foo(ptr %a)
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.localescape(...) #0
|
|
|
|
attributes #0 = { nounwind }
|