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
49 lines
1.5 KiB
MLIR
49 lines
1.5 KiB
MLIR
// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s
|
|
|
|
// Regression test for https://github.com/llvm/llvm-project/issues/120254.
|
|
|
|
omp.declare_reduction @add_reduction : !llvm.ptr alloc {
|
|
%0 = llvm.mlir.constant(1 : i64) : i64
|
|
%1 = llvm.alloca %0 x !llvm.struct<(ptr)> : (i64) -> !llvm.ptr
|
|
omp.yield(%1 : !llvm.ptr)
|
|
} init {
|
|
^bb0(%arg0: !llvm.ptr, %arg1: !llvm.ptr):
|
|
%6 = llvm.mlir.constant(1 : i32) : i32
|
|
"llvm.intr.memcpy"(%arg1, %arg0, %6) <{isVolatile = false}> : (!llvm.ptr, !llvm.ptr, i32) -> ()
|
|
omp.yield(%arg1 : !llvm.ptr)
|
|
} combiner {
|
|
^bb0(%arg0: !llvm.ptr, %arg1: !llvm.ptr):
|
|
omp.yield(%arg0 : !llvm.ptr)
|
|
} cleanup {
|
|
^bb0(%arg0: !llvm.ptr):
|
|
omp.yield
|
|
}
|
|
|
|
llvm.func @use_reduction() attributes {fir.bindc_name = "test"} {
|
|
%6 = llvm.mlir.constant(1 : i32) : i32
|
|
omp.parallel {
|
|
%18 = llvm.mlir.constant(1 : i64) : i64
|
|
%19 = llvm.alloca %18 x !llvm.struct<(ptr)> : (i64) -> !llvm.ptr
|
|
omp.wsloop reduction(byref @add_reduction %19 -> %arg0 : !llvm.ptr) {
|
|
omp.loop_nest (%arg1) : i32 = (%6) to (%6) inclusive step (%6) {
|
|
omp.yield
|
|
}
|
|
}
|
|
omp.terminator
|
|
}
|
|
llvm.return
|
|
}
|
|
|
|
// CHECK: omp.par.entry:
|
|
// CHECK: %[[RED_REGION_ALLOC:.*]] = alloca { ptr }, i64 1, align 8
|
|
// CHECK: %[[PAR_REG_VAL:.*]] = alloca { ptr }, i64 1, align 8
|
|
|
|
// CHECK: omp.par.region:
|
|
// CHECK: br label %omp.par.region1
|
|
|
|
// CHECK: omp.par.region1:
|
|
// CHECK: br label %omp.reduction.init
|
|
|
|
// CHECK: omp.reduction.init:
|
|
// CHECK: call void @llvm.memcpy{{.*}}(ptr %[[RED_REGION_ALLOC]], ptr %[[PAR_REG_VAL]], {{.*}})
|