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
50 lines
1.9 KiB
Plaintext
50 lines
1.9 KiB
Plaintext
// Test hlfir.forall_mask operation parse, verify (no errors), and unparse.
|
|
// RUN: fir-opt %s | fir-opt | FileCheck %s
|
|
|
|
func.func @forall_mask_test(%x: !fir.box<!fir.array<?xf32>>) {
|
|
%c1 = arith.constant 1 : index
|
|
%c10 = arith.constant 10 : index
|
|
hlfir.forall lb {
|
|
hlfir.yield %c1 : index
|
|
} ub {
|
|
hlfir.yield %c10 : index
|
|
} (%i : index) {
|
|
hlfir.forall_mask {
|
|
%mask = fir.call @some_condition(%i) : (index) -> i1
|
|
hlfir.yield %mask : i1
|
|
} do {
|
|
hlfir.region_assign {
|
|
%res = fir.call @foo(%i) : (index) -> f32
|
|
hlfir.yield %res : f32
|
|
} to {
|
|
%xi = hlfir.designate %x(%i) : (!fir.box<!fir.array<?xf32>>, index) -> !fir.ref<f32>
|
|
hlfir.yield %xi : !fir.ref<f32>
|
|
}
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: func.func @forall_mask_test(
|
|
// CHECK-SAME: %[[VAL_0:.*]]: !fir.box<!fir.array<?xf32>>) {
|
|
// CHECK: %[[VAL_1:.*]] = arith.constant 1 : index
|
|
// CHECK: %[[VAL_2:.*]] = arith.constant 10 : index
|
|
// CHECK: hlfir.forall lb {
|
|
// CHECK: hlfir.yield %[[VAL_1]] : index
|
|
// CHECK: } ub {
|
|
// CHECK: hlfir.yield %[[VAL_2]] : index
|
|
// CHECK: } (%[[VAL_3:.*]]: index) {
|
|
// CHECK: hlfir.forall_mask {
|
|
// CHECK: %[[VAL_4:.*]] = fir.call @some_condition(%[[VAL_3]]) : (index) -> i1
|
|
// CHECK: hlfir.yield %[[VAL_4]] : i1
|
|
// CHECK: } do {
|
|
// CHECK: hlfir.region_assign {
|
|
// CHECK: %[[VAL_5:.*]] = fir.call @foo(%[[VAL_3]]) : (index) -> f32
|
|
// CHECK: hlfir.yield %[[VAL_5]] : f32
|
|
// CHECK: } to {
|
|
// CHECK: %[[VAL_6:.*]] = hlfir.designate %[[VAL_0]] (%[[VAL_3]]) : (!fir.box<!fir.array<?xf32>>, index) -> !fir.ref<f32>
|
|
// CHECK: hlfir.yield %[[VAL_6]] : !fir.ref<f32>
|
|
// CHECK: }
|
|
// CHECK: }
|
|
// CHECK: }
|