26 lines · plain
1// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s2 3// The aim of the test is to check the LLVM IR codegen for the device4// for omp teams construct5 6module attributes {omp.is_target_device = true} {7 llvm.func @foo(i32)8 llvm.func @omp_target_teams_shared_simple(%arg0 : i32) attributes {omp.declare_target = #omp.declaretarget<device_type = (any), capture_clause = (to)>} {9 omp.teams {10 llvm.call @foo(%arg0) : (i32) -> ()11 omp.terminator12 }13 llvm.return14 }15}16 17// CHECK-LABEL: @omp_target_teams_shared_simple18// CHECK-SAME: (i32 [[ARG0:%.+]])19// CHECK: call void @[[OUTLINED_FN:.*]](20// CHECK-NOT: call {{.+}} @__kmpc_fork_teams21// CHECK: ret void22 23//CHECK: define internal void @[[OUTLINED_FN]](24//CHECK: call void @foo(i32 %[[FOO_ARG:.*]])25//CHECK: ret void26