Skip to content
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

[flang][OpenMP] Add %flang_fc1 RUN to delayed privatization tests #84296

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

ergawy
Copy link
Member

@ergawy ergawy commented Mar 7, 2024

I did not know how -mmlir flag works and was deferring the addition of --openm-enabled-delayed-privatization until later because I thought some work needs to be done to do that. This commit just adds some extra RUN lines to delayed privatization tests to run them from flang as well.

I did not knnow `-mmlir` flag works and was deferring the addition of
`--openm-enabled-delayed-privatization` until later because I thought
some work needs to be done to do that. This commit just adds some extra
`RUN` lines to delayed privatization tests to run them from `flang` as
well.
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir flang:openmp labels Mar 7, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 7, 2024

@llvm/pr-subscribers-flang-fir-hlfir

@llvm/pr-subscribers-flang-openmp

Author: Kareem Ergawy (ergawy)

Changes

I did not knnow -mmlir flag works and was deferring the addition of --openm-enabled-delayed-privatization until later because I thought some work needs to be done to do that. This commit just adds some extra RUN lines to delayed privatization tests to run them from flang as well.


Full diff: https://github.com/llvm/llvm-project/pull/84296.diff

6 Files Affected:

  • (modified) flang/test/Lower/OpenMP/FIR/delayed-privatization-firstprivate.f90 (+4-1)
  • (modified) flang/test/Lower/OpenMP/FIR/delayed-privatization-private.f90 (+4-1)
  • (modified) flang/test/Lower/OpenMP/delayed-privatization-firstprivate.f90 (+4-1)
  • (modified) flang/test/Lower/OpenMP/delayed-privatization-private-firstprivate.f90 (+4-1)
  • (modified) flang/test/Lower/OpenMP/delayed-privatization-private.f90 (+4-1)
  • (modified) flang/test/Lower/OpenMP/delayed-privatization-reduction.f90 (+4-1)
diff --git a/flang/test/Lower/OpenMP/FIR/delayed-privatization-firstprivate.f90 b/flang/test/Lower/OpenMP/FIR/delayed-privatization-firstprivate.f90
index 122542345f104b..50938342dee7c2 100644
--- a/flang/test/Lower/OpenMP/FIR/delayed-privatization-firstprivate.f90
+++ b/flang/test/Lower/OpenMP/FIR/delayed-privatization-firstprivate.f90
@@ -1,6 +1,9 @@
 ! Test delayed privatization for the `private` clause.
 
-! RUN: bbc -emit-fir -hlfir=false -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir -fopenmp -mmlir \
+! RUN:   --openmp-enable-delayed-privatization -o - %s 2>&1 | FileCheck %s
+! RUN: bbc -emit-fir -hlfir=false -fopenmp --openmp-enable-delayed-privatization \
+! RUN:   -o - %s 2>&1 | FileCheck %s
 
 subroutine delayed_privatization_firstprivate
   implicit none
diff --git a/flang/test/Lower/OpenMP/FIR/delayed-privatization-private.f90 b/flang/test/Lower/OpenMP/FIR/delayed-privatization-private.f90
index 2e9995ea1fd4c4..b13687faa3f26d 100644
--- a/flang/test/Lower/OpenMP/FIR/delayed-privatization-private.f90
+++ b/flang/test/Lower/OpenMP/FIR/delayed-privatization-private.f90
@@ -1,6 +1,9 @@
 ! Test delayed privatization for the `private` clause.
 
-! RUN: bbc -emit-fir -hlfir=false -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir -fopenmp -mmlir \
+! RUN:   --openmp-enable-delayed-privatization -o - %s 2>&1 | FileCheck %s
+! RUN: bbc -emit-fir -hlfir=false -fopenmp --openmp-enable-delayed-privatization \
+! RUN:   -o - %s 2>&1 | FileCheck %s
 
 subroutine delayed_privatization_private
   implicit none
diff --git a/flang/test/Lower/OpenMP/delayed-privatization-firstprivate.f90 b/flang/test/Lower/OpenMP/delayed-privatization-firstprivate.f90
index e3d2a5a8af2608..0fb81d68016a48 100644
--- a/flang/test/Lower/OpenMP/delayed-privatization-firstprivate.f90
+++ b/flang/test/Lower/OpenMP/delayed-privatization-firstprivate.f90
@@ -1,6 +1,9 @@
 ! Test delayed privatization for the `firstprivate` clause.
 
-! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
+! RUN:   -o - %s 2>&1 | FileCheck %s
+! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 \
+! RUN:   | FileCheck %s
 
 subroutine delayed_privatization_firstprivate
   implicit none
diff --git a/flang/test/Lower/OpenMP/delayed-privatization-private-firstprivate.f90 b/flang/test/Lower/OpenMP/delayed-privatization-private-firstprivate.f90
index 46eef6eb3bcf6a..337e7d5ec885cb 100644
--- a/flang/test/Lower/OpenMP/delayed-privatization-private-firstprivate.f90
+++ b/flang/test/Lower/OpenMP/delayed-privatization-private-firstprivate.f90
@@ -1,6 +1,9 @@
 ! Test delayed privatization for both `private` and `firstprivate` clauses.
 
-! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
+! RUN:   -o - %s 2>&1 | FileCheck %s
+! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 \
+! RUN:   | FileCheck %s
 
 subroutine delayed_privatization_private_firstprivate
   implicit none
diff --git a/flang/test/Lower/OpenMP/delayed-privatization-private.f90 b/flang/test/Lower/OpenMP/delayed-privatization-private.f90
index 240e0e71bfcd16..7208521bcd77e4 100644
--- a/flang/test/Lower/OpenMP/delayed-privatization-private.f90
+++ b/flang/test/Lower/OpenMP/delayed-privatization-private.f90
@@ -1,6 +1,9 @@
 ! Test delayed privatization for the `private` clause.
 
-! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
+! RUN:   -o - %s 2>&1 | FileCheck %s
+! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 \
+! RUN:   | FileCheck %s
 
 subroutine delayed_privatization_private
   implicit none
diff --git a/flang/test/Lower/OpenMP/delayed-privatization-reduction.f90 b/flang/test/Lower/OpenMP/delayed-privatization-reduction.f90
index c61f352b9b055a..a7eeb1faceadef 100644
--- a/flang/test/Lower/OpenMP/delayed-privatization-reduction.f90
+++ b/flang/test/Lower/OpenMP/delayed-privatization-reduction.f90
@@ -3,7 +3,10 @@
 ! that the block arguments are added in the proper order (reductions first and
 ! then delayed privatization.
 
-! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
+! RUN:   -o - %s 2>&1 | FileCheck %s
+! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 \
+! RUN:   | FileCheck %s
 
 subroutine red_and_delayed_private
     integer :: red

@ergawy ergawy requested a review from skatrak March 7, 2024 10:07
@ergawy
Copy link
Member Author

ergawy commented Mar 7, 2024

Thanks for the approval @tblah.

@ergawy ergawy merged commit 59e405b into llvm:main Mar 7, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang:openmp flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants