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
73 lines
4.5 KiB
Fortran
73 lines
4.5 KiB
Fortran
! RUN: %flang_fc1 -emit-hlfir %s -o - | FileCheck %s
|
|
|
|
! CHECK-LABEL: func.func @_QPeoshift_test1(
|
|
! CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.array<3x!fir.logical<4>>>{{.*}}, %[[ARG1:.*]]: !fir.ref<i32>{{.*}})
|
|
subroutine eoshift_test1(arr, shift)
|
|
logical, dimension(3) :: arr, res
|
|
integer :: shift
|
|
! CHECK: %[[DS:.*]] = fir.dummy_scope : !fir.dscope
|
|
! CHECK: %[[ARR_DECL:.*]]:2 = hlfir.declare %[[ARG0]]
|
|
! CHECK: %[[RES_ALLOC:.*]] = fir.alloca !fir.array<3x!fir.logical<4>>
|
|
! CHECK: %[[RES_DECL:.*]]:2 = hlfir.declare %[[RES_ALLOC]]
|
|
! CHECK: %[[SHIFT_DECL:.*]]:2 = hlfir.declare %[[ARG1]]
|
|
! CHECK: %[[EXPR:.*]] = hlfir.eoshift %[[ARR_DECL]]#0 %[[SHIFT_DECL]]#0 : (!fir.ref<!fir.array<3x!fir.logical<4>>>, !fir.ref<i32>) -> !hlfir.expr<3x!fir.logical<4>>
|
|
! CHECK: hlfir.assign %[[EXPR]] to %[[RES_DECL]]#0 : !hlfir.expr<3x!fir.logical<4>>, !fir.ref<!fir.array<3x!fir.logical<4>>>
|
|
! CHECK: hlfir.destroy %[[EXPR]] : !hlfir.expr<3x!fir.logical<4>>
|
|
res = eoshift(arr, shift)
|
|
end subroutine eoshift_test1
|
|
|
|
! CHECK-LABEL: func.func @_QPeoshift_test2(
|
|
! CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.array<3x3xi32>>{{.*}}, %[[ARG1:.*]]: !fir.ref<!fir.array<3xi32>>{{.*}}, %[[ARG2:.*]]: !fir.ref<i32>{{.*}}, %[[ARG3:.*]]: !fir.ref<i32>{{.*}})
|
|
subroutine eoshift_test2(arr, shift, bound, dim)
|
|
integer, dimension(3,3) :: arr, res
|
|
integer, dimension(3) :: shift
|
|
integer :: bound, dim
|
|
! CHECK: %[[DS:.*]] = fir.dummy_scope : !fir.dscope
|
|
! CHECK: %[[ARR_DECL:.*]]:2 = hlfir.declare %[[ARG0]]
|
|
! CHECK: %[[BOUND_DECL:.*]]:2 = hlfir.declare %[[ARG2]]
|
|
! CHECK: %[[DIM_DECL:.*]]:2 = hlfir.declare %[[ARG3]]
|
|
! CHECK: %[[RES_ALLOC:.*]] = fir.alloca !fir.array<3x3xi32>
|
|
! CHECK: %[[RES_DECL:.*]]:2 = hlfir.declare %[[RES_ALLOC]]
|
|
! CHECK: %[[SHIFT_DECL:.*]]:2 = hlfir.declare %[[ARG1]]
|
|
! CHECK: %[[DIM_VAL:.*]] = fir.load %[[DIM_DECL]]#0 : !fir.ref<i32>
|
|
! CHECK: %[[EXPR:.*]] = hlfir.eoshift %[[ARR_DECL]]#0 %[[SHIFT_DECL]]#0 boundary %[[BOUND_DECL]]#0 dim %[[DIM_VAL]] : (!fir.ref<!fir.array<3x3xi32>>, !fir.ref<!fir.array<3xi32>>, !fir.ref<i32>, i32) -> !hlfir.expr<3x3xi32>
|
|
! CHECK: hlfir.assign %[[EXPR]] to %[[RES_DECL]]#0 : !hlfir.expr<3x3xi32>, !fir.ref<!fir.array<3x3xi32>>
|
|
! CHECK: hlfir.destroy %[[EXPR]] : !hlfir.expr<3x3xi32>
|
|
res = eoshift(arr, shift, bound, dim)
|
|
end subroutine eoshift_test2
|
|
|
|
! CHECK-LABEL: func.func @_QPeoshift_test3(
|
|
! CHECK-SAME: %[[ARG0:.*]]: !fir.boxchar<1>{{.*}}, %[[ARG1:.*]]: !fir.ref<i32>{{.*}}, %[[ARG2:.*]]: !fir.ref<i32>{{.*}})
|
|
subroutine eoshift_test3(arr, shift, dim)
|
|
character(4), dimension(3,3) :: arr, res
|
|
integer :: shift, dim
|
|
! CHECK: %[[DS:.*]] = fir.dummy_scope : !fir.dscope
|
|
! CHECK: %[[UNBOX:.*]]:2 = fir.unboxchar %[[ARG0]]
|
|
! CHECK: %[[ARR_DECL:.*]]:2 = hlfir.declare %{{.*}}({{.*}}) typeparams %{{.*}} dummy_scope %[[DS]]
|
|
! CHECK: %[[DIM_DECL:.*]]:2 = hlfir.declare %[[ARG2]]
|
|
! CHECK: %[[RES_ALLOC:.*]] = fir.alloca !fir.array<3x3x!fir.char<1,4>>
|
|
! CHECK: %[[RES_DECL:.*]]:2 = hlfir.declare %[[RES_ALLOC]]({{.*}}) typeparams %{{.*}}
|
|
! CHECK: %[[SHIFT_DECL:.*]]:2 = hlfir.declare %[[ARG1]]
|
|
! CHECK: %[[DIM_VAL:.*]] = fir.load %[[DIM_DECL]]#0 : !fir.ref<i32>
|
|
! CHECK: %[[EXPR:.*]] = hlfir.eoshift %[[ARR_DECL]]#0 %[[SHIFT_DECL]]#0 dim %[[DIM_VAL]] : (!fir.ref<!fir.array<3x3x!fir.char<1,4>>>, !fir.ref<i32>, i32) -> !hlfir.expr<3x3x!fir.char<1,4>>
|
|
! CHECK: hlfir.assign %[[EXPR]] to %[[RES_DECL]]#0 : !hlfir.expr<3x3x!fir.char<1,4>>, !fir.ref<!fir.array<3x3x!fir.char<1,4>>>
|
|
! CHECK: hlfir.destroy %[[EXPR]] : !hlfir.expr<3x3x!fir.char<1,4>>
|
|
res = eoshift(arr, SHIFT=shift, DIM=dim)
|
|
end subroutine eoshift_test3
|
|
|
|
! CHECK-LABEL: func.func @_QPeoshift_test_dynamic_optional(
|
|
! CHECK-SAME: %[[ARG0:.*]]: !fir.box<!fir.array<?x?xi32>>{{.*}}, %[[ARG1:.*]]: !fir.ref<i32>{{.*}}, %[[ARG2:.*]]: !fir.ref<!fir.array<10xi32>>{{.*}} {fir.bindc_name = "boundary", fir.optional})
|
|
subroutine eoshift_test_dynamic_optional(array, shift, boundary)
|
|
integer :: array(:, :)
|
|
integer :: shift
|
|
integer, optional :: boundary(10)
|
|
! CHECK: %[[ARRAY_DECL:.*]]:2 = hlfir.declare %[[ARG0]]
|
|
! CHECK: %[[BOUND_DECL:.*]]:2 = hlfir.declare %[[ARG2]]({{.*}})
|
|
! CHECK: %[[SHIFT_DECL:.*]]:2 = hlfir.declare %[[ARG1]]
|
|
! CHECK: %[[EXPR:.*]] = hlfir.eoshift %[[ARRAY_DECL]]#0 %[[SHIFT_DECL]]#0 boundary %{{.*}} : (!fir.box<!fir.array<?x?xi32>>, !fir.ref<i32>, !fir.box<!fir.array<10xi32>>) -> !hlfir.expr<?x?xi32>
|
|
! CHECK: hlfir.associate %[[EXPR]]
|
|
! CHECK: fir.call @_QPnext(
|
|
! CHECK: hlfir.destroy %[[EXPR]]
|
|
call next(eoshift(array, shift, boundary))
|
|
end subroutine
|