brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 89d0d4a Raw
42 lines · plain
1! This test checks lowering of stop statement in OpenACC region.2 3! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s4! RUN: %flang_fc1 -emit-hlfir -fopenacc %s -o - | FileCheck %s5 6! CHECK-LABEL: func.func @_QPtest_stop_in_region1() {7! CHECK:         acc.parallel {8! CHECK:           %[[VAL_0:.*]] = arith.constant 1 : i329! CHECK:           %[[VAL_1:.*]] = arith.constant false10! CHECK:           %[[VAL_2:.*]] = arith.constant false11! CHECK:           fir.call @_FortranAStopStatement(%[[VAL_0]], %[[VAL_1]], %[[VAL_2]]) {{.*}} : (i32, i1, i1) -> ()12! CHECK:           acc.yield13! CHECK:         }14! CHECK:         return15! CHECK:       }16 17subroutine test_stop_in_region1()18  !$acc parallel19    stop 120  !$acc end parallel21end22 23! CHECK-LABEL: func.func @_QPtest_stop_in_region2() {24! CHECK:         %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "x", uniq_name = "_QFtest_stop_in_region2Ex"}25! CHECK:         acc.parallel {26! CHECK:           %[[VAL_1:.*]] = arith.constant 1 : i3227! CHECK:           %[[VAL_2:.*]] = arith.constant false28! CHECK:           %[[VAL_3:.*]] = arith.constant false29! CHECK:           fir.call @_FortranAStopStatement(%[[VAL_1]], %[[VAL_2]], %[[VAL_3]]) {{.*}} : (i32, i1, i1) -> ()30! CHECK:           acc.yield31! CHECK:         }32! CHECK:         return33! CHECK:       }34 35subroutine test_stop_in_region2()36  integer :: x37  !$acc parallel38    stop 139    x = 240  !$acc end parallel41end42