brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · e7bced4 Raw
24 lines · plain
1!RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=51 %s -mmlir -mlir-print-op-generic -o - | FileCheck %s2!RUN: bbc -emit-hlfir -fopenmp -fopenmp-version=51 %s -mlir-print-op-generic -o - | FileCheck %s3 4! Check that we don't generate member information for the descriptor of `a`5! on entry to the target region.6 7integer function s(a)8  integer :: a(:)9  integer :: t10  !$omp target data map(to:a) use_device_addr(a)11  !$omp target map(from:t) has_device_addr(a)12  t = size(a, 1)13  !$omp end target14  !$omp end target data15  s = t16end17 18! Check that the map.info for `a` only takes a single parameter.19 20!CHECK-DAG: %[[MAP_A:[0-9]+]] = "omp.map.info"(%[[STORAGE_A:[0-9#]+]]) <{map_capture_type = #omp<variable_capture_kind(ByRef)>, map_type = #omp<clause_map_flags to|always|implicit>, name = "a", operandSegmentSizes = array<i32: 1, 0, 0, 0>, partial_map = false, var_type = !fir.box<!fir.array<?xi32>>}> : (!fir.ref<!fir.box<!fir.array<?xi32>>>) -> !fir.ref<!fir.array<?xi32>>21!CHECK-DAG: %[[MAP_T:[0-9]+]] = "omp.map.info"(%[[STORAGE_T:[0-9#]+]]) <{map_capture_type = #omp<variable_capture_kind(ByRef)>, map_type = #omp<clause_map_flags from>, name = "t", operandSegmentSizes = array<i32: 1, 0, 0, 0>, partial_map = false, var_type = i32}> : (!fir.ref<i32>) -> !fir.ref<i32>22 23!CHECK: "omp.target"(%[[MAP_A]], %[[MAP_T]])24