Files
TheRock/compiler/amd-llvm/flang/test/Integration/unroll_and_jam.f90
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

69 lines
2.2 KiB
Fortran

! RUN: %flang_fc1 -emit-llvm -o - %s | FileCheck %s
! CHECK-LABEL: unroll_and_jam_dir
subroutine unroll_and_jam_dir
integer :: a(10)
!dir$ unroll_and_jam 4
! CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}
! CHECK-NOT: !llvm.loop
! CHECK: br label {{.*}}, !llvm.loop ![[ANNOTATION:.*]]
do i=1,10
a(i)=i
end do
end subroutine unroll_and_jam_dir
! CHECK-LABEL: unroll_and_jam_dir_0
subroutine unroll_and_jam_dir_0
integer :: a(10)
!dir$ unroll_and_jam 0
! CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}
! CHECK-NOT: !llvm.loop
! CHECK: br label {{.*}}, !llvm.loop ![[ANNOTATION_DISABLE:.*]]
do i=1,10
a(i)=i
end do
end subroutine unroll_and_jam_dir_0
! CHECK-LABEL: unroll_and_jam_dir_1
subroutine unroll_and_jam_dir_1
integer :: a(10)
!dir$ unroll_and_jam 1
! CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}
! CHECK-NOT: !llvm.loop
! CHECK: br label {{.*}}, !llvm.loop ![[ANNOTATION_DISABLE]]
do i=1,10
a(i)=i
end do
end subroutine unroll_and_jam_dir_1
! CHECK-LABEL: nounroll_and_jam_dir
subroutine nounroll_and_jam_dir
integer :: a(10)
!dir$ nounroll_and_jam
! CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}
! CHECK-NOT: !llvm.loop
! CHECK: br label {{.*}}, !llvm.loop ![[ANNOTATION_DISABLE]]
do i=1,10
a(i)=i
end do
end subroutine nounroll_and_jam_dir
! CHECK-LABEL: unroll_and_jam_dir_no_factor
subroutine unroll_and_jam_dir_no_factor
integer :: a(10)
!dir$ unroll_and_jam
! CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}
! CHECK-NOT: !llvm.loop
! CHECK: br label {{.*}}, !llvm.loop ![[ANNOTATION_NO_FACTOR:.*]]
do i=1,10
a(i)=i
end do
end subroutine unroll_and_jam_dir_no_factor
! CHECK: ![[ANNOTATION]] = distinct !{![[ANNOTATION]], ![[UNROLL_AND_JAM:.*]], ![[UNROLL_AND_JAM_COUNT:.*]]}
! CHECK: ![[UNROLL_AND_JAM]] = !{!"llvm.loop.unroll_and_jam.enable"}
! CHECK: ![[UNROLL_AND_JAM_COUNT]] = !{!"llvm.loop.unroll_and_jam.count", i32 4}
! CHECK: ![[ANNOTATION_DISABLE]] = distinct !{![[ANNOTATION_DISABLE]], ![[UNROLL_AND_JAM2:.*]]}
! CHECK: ![[UNROLL_AND_JAM2]] = !{!"llvm.loop.unroll_and_jam.disable"}
! CHECK: ![[ANNOTATION_NO_FACTOR]] = distinct !{![[ANNOTATION_NO_FACTOR]], ![[UNROLL_AND_JAM]]}