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
2.3 KiB
MLIR
50 lines
2.3 KiB
MLIR
// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
|
|
|
|
// Check converting code where there are operations other than omp.taskloop.wrapper
|
|
// inside of omp.taskloop.context.
|
|
|
|
// The following is a common pattern generated by flang when accessing
|
|
// mutable boxes (e.g. ALLOCATABLE) inside of a taskloop
|
|
|
|
omp.private {type = private} @_QFtest_taskloopEi_private_i32 : i32
|
|
|
|
llvm.func @_QPtest_taskloop(%arg0: !llvm.ptr) {
|
|
%0 = llvm.mlir.constant(48 : i32) : i32
|
|
%1 = llvm.mlir.constant(1 : i32) : i32
|
|
%2 = llvm.mlir.constant(100 : i32) : i32
|
|
%3 = llvm.mlir.constant(1 : i64) : i64
|
|
%4 = llvm.alloca %3 x i32 : (i64) -> !llvm.ptr
|
|
omp.taskloop.context private(@_QFtest_taskloopEi_private_i32 %4 -> %arg1 : !llvm.ptr) {
|
|
// test where this alloca ends up
|
|
%5 = llvm.alloca %1 x !llvm.struct<(ptr, i64, i32, i8, i8, i8, i8, array<1 x array<3 x i64>>)> {alignment = 8 : i64} : (i32) -> !llvm.ptr
|
|
omp.taskloop.wrapper {
|
|
omp.loop_nest (%arg2) : i32 = (%1) to (%2) inclusive step (%1) {
|
|
llvm.store %arg2, %arg1 : i32, !llvm.ptr
|
|
"llvm.intr.memcpy"(%5, %arg0, %0) <{arg_attrs = [{llvm.align = 8 : i64}, {llvm.align = 8 : i64}, {}], isVolatile = false}> : (!llvm.ptr, !llvm.ptr, i32) -> ()
|
|
%6 = llvm.getelementptr %5[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(ptr, i64, i32, i8, i8, i8, i8, array<1 x array<3 x i64>>)>
|
|
%7 = llvm.load %6 : !llvm.ptr -> !llvm.ptr
|
|
llvm.call @_QPdo_something(%7) {fastmathFlags = #llvm.fastmath<contract>} : (!llvm.ptr) -> ()
|
|
omp.yield
|
|
}
|
|
}
|
|
omp.terminator
|
|
}
|
|
llvm.return
|
|
}
|
|
|
|
llvm.func @_QPdo_something(!llvm.ptr) attributes {sym_visibility = "private"}
|
|
|
|
// Outlined task function:
|
|
// CHECK-LABEL: define internal void @_QPtest_taskloop..omp_par(
|
|
// CHECK: taskloop.alloca:
|
|
// ...
|
|
// CHECK: br label %[[VAL_31:taskloop.body]]
|
|
|
|
// CHECK: taskloop.body: ; preds = %[[VAL_32:.*]]
|
|
// CHECK-NEXT: br label %[[VAL_33:omp.taskloop.context.region]]
|
|
|
|
// CHECK: omp.taskloop.context.region: ; preds = %[[VAL_31]]
|
|
// This will be folded into the entry block by later optimization passes:
|
|
// CHECK-NEXT: %[[VAL_34:.*]] = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
|
|
// CHECK-NEXT: br label %[[VAL_35:omp.taskloop.wrapper.region]]
|