[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / flang / test / Lower / OpenACC / acc-shutdown.f90
blobf63f5d62b4fe921f16f1ad9615a2e5c80054c578
1 ! This test checks lowering of OpenACC shutdown directive.
3 ! RUN: bbc -fopenacc -emit-fir %s -o - | FileCheck %s
4 ! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s
6 subroutine acc_shutdown
7 logical :: ifCondition = .TRUE.
9 !$acc shutdown
10 !CHECK: acc.shutdown{{ *}}{{$}}
12 !$acc shutdown if(.true.)
13 !CHECK: [[IF1:%.*]] = arith.constant true
14 !CHECK: acc.shutdown if([[IF1]]){{$}}
16 !$acc shutdown if(ifCondition)
17 !CHECK: [[IFCOND:%.*]] = fir.load %{{.*}} : !fir.ref<!fir.logical<4>>
18 !CHECK: [[IF2:%.*]] = fir.convert [[IFCOND]] : (!fir.logical<4>) -> i1
19 !CHECK: acc.shutdown if([[IF2]]){{$}}
21 !$acc shutdown device_num(1)
22 !CHECK: [[DEVNUM:%.*]] = arith.constant 1 : i32
23 !CHECK: acc.shutdown device_num([[DEVNUM]] : i32){{$}}
25 !$acc shutdown device_num(1) device_type(default, nvidia)
26 !CHECK: [[DEVNUM:%.*]] = arith.constant 1 : i32
27 !CHECK: acc.shutdown device_num([[DEVNUM]] : i32) attributes {device_types = [#acc.device_type<default>, #acc.device_type<nvidia>]}
29 end subroutine acc_shutdown