brintos

brintos / llvm-project-archived public Read only

0
0
Text · 848 B · d1d441d Raw
31 lines · plain
1!RUN: %flang_fc1 -emit-llvm -fopenmp %s -o - | FileCheck %s --check-prefix=NORT2!RUN: %flang_fc1 -emit-llvm -fopenmp %s -o - | FileCheck %s --check-prefix=LLVM3 4!Make sure that there are no calls to the mapper.5!NORT-NOT: call{{.*}}__tgt_target_data_begin_mapper6!NORT-NOT: call{{.*}}__tgt_target_data_end_mapper7 8!Make sure we generate the body9!LLVM: define internal void @_QFPf(ptr noalias %[[A0:[0-9]+]], ptr noalias %[[A1:[0-9]+]])10!LLVM:   %[[V0:[0-9]+]] = load i32, ptr %[[A0]], align 411!LLVM:   %[[V1:[0-9]+]] = load i32, ptr %[[A1]], align 412!LLVM:   %[[V2:[0-9]+]] = add i32 %[[V0]], %[[V1]]13!LLVM:   store i32 %[[V2]], ptr %[[A0]], align 414!LLVM:   ret void15!LLVM: }16 17 18program test19 20call f(1, 2)21 22contains23 24subroutine f(x, y)25  integer :: x, y26  !$omp target data map(tofrom: x, y)27  x = x + y28  !$omp end target data29end subroutine30end31