CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
73 lines
2.9 KiB
Fortran
73 lines
2.9 KiB
Fortran
! Test parsing and unparsing of SIMD Directive
|
|
|
|
! RUN: %flang_fc1 -fdebug-dump-parse-tree %s -o - | FileCheck %s --check-prefix="PARSE-TREE"
|
|
! RUN: %flang_fc1 -fdebug-unparse %s -o - | FileCheck %s --check-prefix="UNPARSE"
|
|
|
|
subroutine test()
|
|
integer :: i, n, sum
|
|
n = 10
|
|
sum = 0
|
|
|
|
!DIR$ SIMD
|
|
do i = 1, n
|
|
sum = sum + i
|
|
end do
|
|
end subroutine
|
|
|
|
! UNPARSE: SUBROUTINE test
|
|
! UNPARSE: INTEGER i, n, sum
|
|
! UNPARSE: n=10_4
|
|
! UNPARSE: sum=0_4
|
|
! UNPARSE: !DIR$ SIMD
|
|
! UNPARSE: DO i=1_4,n
|
|
! UNPARSE: sum=sum+i
|
|
! UNPARSE: END DO
|
|
! UNPARSE: END SUBROUTINE
|
|
|
|
! PARSE-TREE: ======================== Flang: parse tree dump ========================
|
|
! PARSE-TREE: Program -> ProgramUnit -> SubroutineSubprogram
|
|
! PARSE-TREE: | SubroutineStmt
|
|
! PARSE-TREE: | | Name = 'test'
|
|
! PARSE-TREE: | SpecificationPart
|
|
! PARSE-TREE: | | ImplicitPart ->
|
|
! PARSE-TREE: | | DeclarationConstruct -> SpecificationConstruct -> TypeDeclarationStmt
|
|
! PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec ->
|
|
! PARSE-TREE: | | | EntityDecl
|
|
! PARSE-TREE: | | | | Name = 'i'
|
|
! PARSE-TREE: | | | EntityDecl
|
|
! PARSE-TREE: | | | | Name = 'n'
|
|
! PARSE-TREE: | | | EntityDecl
|
|
! PARSE-TREE: | | | | Name = 'sum'
|
|
! PARSE-TREE: | ExecutionPart -> Block
|
|
! PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'n=10_4'
|
|
! PARSE-TREE: | | | Variable = 'n'
|
|
! PARSE-TREE: | | | | Designator -> DataRef -> Name = 'n'
|
|
! PARSE-TREE: | | | Expr = '10_4'
|
|
! PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '10'
|
|
! PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'sum=0_4'
|
|
! PARSE-TREE: | | | Variable = 'sum'
|
|
! PARSE-TREE: | | | | Designator -> DataRef -> Name = 'sum'
|
|
! PARSE-TREE: | | | Expr = '0_4'
|
|
! PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '0'
|
|
! PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> CompilerDirective -> Simd
|
|
! PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> DoConstruct
|
|
! PARSE-TREE: | | | NonLabelDoStmt
|
|
! PARSE-TREE: | | | | LoopControl -> LoopBounds
|
|
! PARSE-TREE: | | | | | Scalar -> Name = 'i'
|
|
! PARSE-TREE: | | | | | Scalar -> Expr = '1_4'
|
|
! PARSE-TREE: | | | | | | LiteralConstant -> IntLiteralConstant = '1'
|
|
! PARSE-TREE: | | | | | Scalar -> Expr = 'n'
|
|
! PARSE-TREE: | | | | | | Designator -> DataRef -> Name = 'n'
|
|
! PARSE-TREE: | | | Block
|
|
! PARSE-TREE: | | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'sum=sum+i'
|
|
! PARSE-TREE: | | | | | Variable = 'sum'
|
|
! PARSE-TREE: | | | | | | Designator -> DataRef -> Name = 'sum'
|
|
! PARSE-TREE: | | | | | Expr = 'sum+i'
|
|
! PARSE-TREE: | | | | | | Add
|
|
! PARSE-TREE: | | | | | | | Expr = 'sum'
|
|
! PARSE-TREE: | | | | | | | | Designator -> DataRef -> Name = 'sum'
|
|
! PARSE-TREE: | | | | | | | Expr = 'i'
|
|
! PARSE-TREE: | | | | | | | | Designator -> DataRef -> Name = 'i'
|
|
! PARSE-TREE: | | | EndDoStmt ->
|
|
! PARSE-TREE: | EndSubroutineStmt ->
|