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
78 lines
4.8 KiB
C++
78 lines
4.8 KiB
C++
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs --prefix-filecheck-ir-name _ --version 6
|
|
// RUN: %clang_cc1 -fopenmp -O1 -x c++ -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK
|
|
|
|
template <class Function, class... Args>
|
|
void run_task(Function function, Args... args) {
|
|
#pragma omp task untied
|
|
{ function(args...); }
|
|
}
|
|
|
|
void bar(int a, float b);
|
|
|
|
void foo() {
|
|
int a;
|
|
float b;
|
|
run_task(bar, a, b);
|
|
}
|
|
// CHECK-LABEL: define void @_Z3foov(
|
|
// CHECK-SAME: ) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @__kmpc_global_thread_num(ptr nonnull @[[GLOB1:[0-9]+]])
|
|
// CHECK-NEXT: [[TMP1:%.*]] = tail call ptr @__kmpc_omp_task_alloc(ptr nonnull @[[GLOB1]], i32 [[TMP0]], i32 0, i64 56, i64 1, ptr nonnull @.omp_task_entry.)
|
|
// CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds nuw i8, ptr [[TMP1]], i64 40
|
|
// CHECK-NEXT: store ptr @_Z3barif, ptr [[TMP2]], align 8, !tbaa [[ANYPTR_TBAA7:![0-9]+]]
|
|
// CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds nuw i8, ptr [[TMP1]], i64 16
|
|
// CHECK-NEXT: store i32 0, ptr [[TMP3]], align 8, !tbaa [[INT_TBAA13:![0-9]+]]
|
|
// CHECK-NEXT: [[TMP4:%.*]] = tail call i32 @__kmpc_omp_task(ptr nonnull @[[GLOB1]], i32 [[TMP0]], ptr [[TMP1]])
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
//
|
|
// CHECK-LABEL: define internal noundef i32 @.omp_task_entry.(
|
|
// CHECK-SAME: i32 noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3:[0-9]+]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds nuw i8, ptr [[TMP1]], i64 16
|
|
// CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata [[META14:![0-9]+]])
|
|
// CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata [[META17:![0-9]+]])
|
|
// CHECK-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4, !tbaa [[INT_TBAA3:![0-9]+]], !alias.scope [[META14]], !noalias [[META17]]
|
|
// CHECK-NEXT: switch i32 [[TMP3]], [[DOTOMP_OUTLINED__EXIT:label %.*]] [
|
|
// CHECK-NEXT: i32 0, [[DOTUNTIED_JMP__I:label %.*]]
|
|
// CHECK-NEXT: i32 1, [[DOTUNTIED_NEXT__I:label %.*]]
|
|
// CHECK-NEXT: ]
|
|
// CHECK: [[_UNTIED_JMP__I:.*:]]
|
|
// CHECK-NEXT: store i32 1, ptr [[TMP2]], align 4, !tbaa [[INT_TBAA3]], !alias.scope [[META14]], !noalias [[META17]]
|
|
// CHECK-NEXT: [[TMP4:%.*]] = tail call i32 @__kmpc_omp_task(ptr nonnull @[[GLOB1]], i32 [[TMP0]], ptr nonnull [[TMP1]]), !noalias [[META19:![0-9]+]]
|
|
// CHECK-NEXT: br [[DOTOMP_OUTLINED__EXIT]]
|
|
// CHECK: [[_UNTIED_NEXT__I:.*:]]
|
|
// CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds nuw i8, ptr [[TMP1]], i64 40
|
|
// CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds nuw i8, ptr [[TMP1]], i64 52
|
|
// CHECK-NEXT: [[TMP7:%.*]] = getelementptr inbounds nuw i8, ptr [[TMP1]], i64 48
|
|
// CHECK-NEXT: [[TMP8:%.*]] = load ptr, ptr [[TMP5]], align 8, !tbaa [[ANYPTR_TBAA20:![0-9]+]], !alias.scope [[META17]], !noalias [[META14]]
|
|
// CHECK-NEXT: [[TMP9:%.*]] = load i32, ptr [[TMP7]], align 8, !tbaa [[INT_TBAA3]], !alias.scope [[META17]], !noalias [[META14]]
|
|
// CHECK-NEXT: [[TMP10:%.*]] = load float, ptr [[TMP6]], align 4, !tbaa [[FLOAT_TBAA21:![0-9]+]], !alias.scope [[META17]], !noalias [[META14]]
|
|
// CHECK-NEXT: tail call void [[TMP8]](i32 noundef [[TMP9]], float noundef [[TMP10]]) #[[ATTR2:[0-9]+]], !noalias [[META19]]
|
|
// CHECK-NEXT: br [[DOTOMP_OUTLINED__EXIT]]
|
|
// CHECK: [[_OMP_OUTLINED__EXIT:.*:]]
|
|
// CHECK-NEXT: ret i32 0
|
|
//
|
|
//.
|
|
// CHECK: [[INT_TBAA3]] = !{[[META4:![0-9]+]], [[META4]], i64 0}
|
|
// CHECK: [[META4]] = !{!"int", [[META5:![0-9]+]], i64 0}
|
|
// CHECK: [[META5]] = !{!"omnipotent char", [[META6:![0-9]+]], i64 0}
|
|
// CHECK: [[META6]] = !{!"Simple C++ TBAA"}
|
|
// CHECK: [[ANYPTR_TBAA7]] = !{[[META8:![0-9]+]], [[META10:![0-9]+]], i64 40}
|
|
// CHECK: [[META8]] = !{!"_ZTS24kmp_task_t_with_privates", [[META9:![0-9]+]], i64 0, [[META11:![0-9]+]], i64 40}
|
|
// CHECK: [[META9]] = !{!"_ZTS10kmp_task_t", [[META10]], i64 0, [[META10]], i64 8, [[META4]], i64 16, [[META5]], i64 24, [[META5]], i64 32}
|
|
// CHECK: [[META10]] = !{!"any pointer", [[META5]], i64 0}
|
|
// CHECK: [[META11]] = !{!"_ZTS15.kmp_privates.t", [[META10]], i64 0, [[META4]], i64 8, [[META12:![0-9]+]], i64 12}
|
|
// CHECK: [[META12]] = !{!"float", [[META5]], i64 0}
|
|
// CHECK: [[INT_TBAA13]] = !{[[META8]], [[META4]], i64 16}
|
|
// CHECK: [[META14]] = !{[[META15:![0-9]+]]}
|
|
// CHECK: [[META15]] = distinct !{[[META15]], [[META16:![0-9]+]], !".omp_outlined.: %.part_id."}
|
|
// CHECK: [[META16]] = distinct !{[[META16]], !".omp_outlined."}
|
|
// CHECK: [[META17]] = !{[[META18:![0-9]+]]}
|
|
// CHECK: [[META18]] = distinct !{[[META18]], [[META16]], !".omp_outlined.: %.privates."}
|
|
// CHECK: [[META19]] = !{[[META15]], [[META18]]}
|
|
// CHECK: [[ANYPTR_TBAA20]] = !{[[META10]], [[META10]], i64 0}
|
|
// CHECK: [[FLOAT_TBAA21]] = !{[[META12]], [[META12]], i64 0}
|
|
//.
|