brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · 786b604 Raw
93 lines · plain
1! RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case %s2! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s3 4! Check for parsing of masked directive with filter clause. 5 6 7subroutine test_masked()8  integer :: c = 19  !PARSE-TREE: OmpBeginDirective10  !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = masked11  !CHECK: !$omp masked12  !$omp masked 13  c = c + 114  !$omp end masked15  !PARSE-TREE: OmpBeginDirective16  !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = masked17  !PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Filter -> Scalar -> Integer -> Expr = '1_4'18  !PARSE-TREE-NEXT: LiteralConstant -> IntLiteralConstant = '1'19  !CHECK: !$omp masked filter(1_4)20  !$omp masked filter(1) 21  c = c + 222  !$omp end masked23end subroutine24 25subroutine test_masked_taskloop_simd()26  integer :: i, j = 127  !PARSE-TREE: OmpBeginLoopDirective28  !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = masked taskloop simd29  !CHECK: !$omp masked taskloop simd30  !$omp masked taskloop simd 31  do i=1,1032   j = j + 133  end do34  !$omp end masked taskloop simd35end subroutine36 37subroutine test_masked_taskloop38  integer :: i, j = 139  !PARSE-TREE: OmpBeginLoopDirective40  !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = masked taskloop41  !PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Filter -> Scalar -> Integer -> Expr = '2_4'42  !PARSE-TREE-NEXT: LiteralConstant -> IntLiteralConstant = '2'43  !CHECK: !$omp masked taskloop filter(2_4)44  !$omp masked taskloop filter(2) 45  do i=1,1046   j = j + 147  end do48  !$omp end masked taskloop 49end subroutine50 51subroutine test_parallel_masked52  integer, parameter :: i = 1, j = 153  integer :: c = 254  !PARSE-TREE: OmpBeginDirective55  !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = parallel masked56  !PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Filter -> Scalar -> Integer -> Expr = '2_4'57  !PARSE-TREE-NEXT: Add58  !PARSE-TREE-NEXT: Expr = '1_4'59  !PARSE-TREE-NEXT: Designator -> DataRef -> Name = 'i'60  !PARSE-TREE-NEXT: Expr = '1_4'61  !PARSE-TREE-NEXT: Designator -> DataRef -> Name = 'j'62  !CHECK: !$omp parallel masked filter(2_4)63  !$omp parallel masked filter(i+j)64  c = c + 265  !$omp end parallel masked66end subroutine67 68subroutine test_parallel_masked_taskloop_simd69  integer :: i, j = 170  !PARSE-TREE: OmpBeginLoopDirective71  !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = parallel masked taskloop simd72  !CHECK: !$omp parallel masked taskloop simd73  !$omp parallel masked taskloop simd 74  do i=1,1075   j = j + 176  end do77  !$omp end parallel masked taskloop simd78end subroutine79 80subroutine test_parallel_masked_taskloop81  integer :: i, j = 182  !PARSE-TREE: OmpBeginLoopDirective83  !PARSE-TREE-NEXT: OmpDirectiveName -> llvm::omp::Directive = parallel masked taskloop84  !PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Filter -> Scalar -> Integer -> Expr = '2_4'85  !PARSE-TREE-NEXT: LiteralConstant -> IntLiteralConstant = '2'86  !CHECK: !$omp parallel masked taskloop filter(2_4)87  !$omp parallel masked taskloop filter(2) 88  do i=1,1089   j = j + 190  end do91  !$omp end parallel masked taskloop 92end subroutine93