brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 6654305 Raw
30 lines · plain
1! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-is-device -munsafe-fp-atomics %s -o - | FileCheck -check-prefix=UNSAFE-FP-ATOMICS %s2! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-is-device -fatomic-ignore-denormal-mode %s -o - | FileCheck -check-prefix=IGNORE-DENORMAL %s3! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-is-device -fatomic-fine-grained-memory %s -o - | FileCheck -check-prefix=FINE-GRAINED-MEMORY %s4! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-is-device -fatomic-remote-memory %s -o - | FileCheck -check-prefix=REMOTE-MEMORY %s5program test6    implicit none7    integer :: A, B, threads8    threads = 1289    A = 010    B = 011    !UNSAFE-FP-ATOMICS: } {atomic_control = #omp.atomic_control<ignore_denormal_mode = true>}12    !IGNORE-DENORMAL: } {atomic_control = #omp.atomic_control<ignore_denormal_mode = true>}13    !FINE-GRAINED-MEMORY: } {atomic_control = #omp.atomic_control<fine_grained_memory = true>}14    !REMOTE-MEMORY: } {atomic_control = #omp.atomic_control<remote_memory = true>}15    !$omp target parallel num_threads(threads)16    !$omp atomic17    A =  A + 118    !$omp end target parallel19    !UNSAFE-FP-ATOMICS: } {atomic_control = #omp.atomic_control<ignore_denormal_mode = true>}20    !IGNORE-DENORMAL: } {atomic_control = #omp.atomic_control<ignore_denormal_mode = true>}21    !FINE-GRAINED-MEMORY: } {atomic_control = #omp.atomic_control<fine_grained_memory = true>}22    !REMOTE-MEMORY: } {atomic_control = #omp.atomic_control<remote_memory = true>}23    !$omp target parallel num_threads(threads)24    !$omp atomic capture25        A = A + B26        B = A27    !$omp end atomic28    !$omp end target parallel29end program test30