Skip to content

[flang][OpenMP] Add OpenMP versions to some tests #89295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions flang/test/Lower/OpenMP/FIR/if-clause.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
! This test checks lowering of OpenMP IF clauses.

! RUN: bbc -fopenmp -emit-fir %s -o - | FileCheck %s
! RUN: %flang_fc1 -fopenmp -emit-fir %s -o - | FileCheck %s
! The "if" clause was added to the "simd" directive in OpenMP 5.0, and
! to the "teams" directive in OpenMP 5.2.
! RUN: bbc -fopenmp -fopenmp-version=52 -emit-fir %s -o - | FileCheck %s
! RUN: %flang_fc1 -fopenmp -fopenmp-version=52 -emit-fir %s -o - | FileCheck %s

program main
integer :: i
Expand Down
3 changes: 2 additions & 1 deletion flang/test/Lower/OpenMP/FIR/simd.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
! Tests for 2.9.3.1 Simd

! RUN: bbc -fopenmp -emit-fir -hlfir=false %s -o - | FileCheck %s
! The "if" clause was added to the "simd" directive in OpenMP 5.0.
! RUN: bbc -fopenmp -fopenmp-version=50 -emit-fir -hlfir=false %s -o - | FileCheck %s

!CHECK-LABEL: func @_QPsimd()
subroutine simd
Expand Down
3 changes: 2 additions & 1 deletion flang/test/Lower/OpenMP/FIR/target.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
!RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir -fopenmp %s -o - | FileCheck %s
! The "thread_limit" clause was added to the "target" construct in OpenMP 5.1.
! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir -fopenmp -fopenmp-version=51 %s -o - | FileCheck %s

!===============================================================================
! Target_Enter Simple
Expand Down
6 changes: 4 additions & 2 deletions flang/test/Lower/OpenMP/if-clause.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
! This test checks lowering of OpenMP IF clauses.

! RUN: bbc -fopenmp -emit-hlfir %s -o - | FileCheck %s
! RUN: %flang_fc1 -fopenmp -emit-hlfir %s -o - | FileCheck %s
! The "if" clause was added to the "simd" directive in OpenMP 5.0, and
! to the "teams" directive in OpenMP 5.2.
! RUN: bbc -fopenmp -fopenmp-version=52 -emit-hlfir %s -o - | FileCheck %s
! RUN: %flang_fc1 -fopenmp -fopenmp-version=52 -emit-hlfir %s -o - | FileCheck %s

program main
integer :: i
Expand Down
5 changes: 3 additions & 2 deletions flang/test/Lower/OpenMP/simd.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
! Tests for 2.9.3.1 Simd

!RUN: %flang_fc1 -flang-experimental-hlfir -emit-hlfir -fopenmp %s -o - | FileCheck %s
!RUN: bbc -hlfir -emit-hlfir -fopenmp %s -o - | FileCheck %s
! The "if" clause was added to the "simd" directive in OpenMP 5.0.
! RUN: %flang_fc1 -flang-experimental-hlfir -emit-hlfir -fopenmp -fopenmp-version=50 %s -o - | FileCheck %s
! RUN: bbc -hlfir -emit-hlfir -fopenmp -fopenmp-version=50 %s -o - | FileCheck %s

!CHECK-LABEL: func @_QPsimd()
subroutine simd
Expand Down
3 changes: 2 additions & 1 deletion flang/test/Lower/OpenMP/target.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
! The "thread_limit" clause was added to the "target" construct in OpenMP 5.1.
! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=51 %s -o - | FileCheck %s

!===============================================================================
! Target_Enter Simple
Expand Down
5 changes: 3 additions & 2 deletions flang/test/Lower/OpenMP/use-device-ptr-to-use-device-addr.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
!RUN: bbc -emit-hlfir -fopenmp %s -o - | FileCheck %s
! The "use_device_addr" was added to the "target data" directive in OpenMP 5.0.
! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=50 %s -o - | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp -fopenmp-version=50 %s -o - | FileCheck %s

! This tests primary goal is to check the promotion of
! non-CPTR arguments from use_device_ptr to
Expand Down