[flang-commits] [flang] f999e1d - [Flang][OpenMP] Replace fir.store with hlfir.assign in OpenMP single … (#70164)
via flang-commits
flang-commits at lists.llvm.org
Tue Oct 24 22:54:31 PDT 2023
Author: harishch4
Date: 2023-10-25T11:24:27+05:30
New Revision: f999e1d7440e9aa2b181af3c7daa04c27363eadb
URL: https://github.com/llvm/llvm-project/commit/f999e1d7440e9aa2b181af3c7daa04c27363eadb
DIFF: https://github.com/llvm/llvm-project/commit/f999e1d7440e9aa2b181af3c7daa04c27363eadb.diff
LOG: [Flang][OpenMP] Replace fir.store with hlfir.assign in OpenMP single … (#70164)
…test
This fixes failures from a recent merge.
[Flang][OpenMP] Port OpenMP single tests to hlfir flow
(https://github.com/llvm/llvm-project/pull/69877)
Added:
Modified:
flang/test/Lower/OpenMP/single.f90
Removed:
################################################################################
diff --git a/flang/test/Lower/OpenMP/single.f90 b/flang/test/Lower/OpenMP/single.f90
index b336445c7ac9003..ffc41af84e3c217 100644
--- a/flang/test/Lower/OpenMP/single.f90
+++ b/flang/test/Lower/OpenMP/single.f90
@@ -81,8 +81,8 @@ end subroutine single_allocate
! CHECK: %[[X_PVT_DECL:.*]]:2 = hlfir.declare %[[X_PVT]] {uniq_name = "_QFsingle_privatizationEx"} : (!fir.ref<f32>) -> (!fir.ref<f32>, !fir.ref<f32>)
! CHECK: %[[Y_PVT:.*]] = fir.alloca f64 {bindc_name = "y", pinned, uniq_name = "_QFsingle_privatizationEy"}
! CHECK: %[[Y_PVT_DECL:.*]]:2 = hlfir.declare %[[Y_PVT]] {uniq_name = "_QFsingle_privatizationEy"} : (!fir.ref<f64>) -> (!fir.ref<f64>, !fir.ref<f64>)
-! CHECK: %[[Y_LOAD:.*]] = fir.load %[[Y_DECL]]#1 : !fir.ref<f64>
-! CHECK: fir.store %[[Y_LOAD]] to %[[Y_PVT_DECL]]#1 : !fir.ref<f64>
+! CHECK: %[[Y_LOAD:.*]] = fir.load %[[Y_DECL]]#0 : !fir.ref<f64>
+! CHECK: hlfir.assign %[[Y_LOAD]] to %[[Y_PVT_DECL]]#0 temporary_lhs : f64, !fir.ref<f64>
! CHECK: fir.call @_QPbar(%[[X_PVT_DECL]]#1, %[[Y_PVT_DECL]]#1) fastmath<contract> : (!fir.ref<f32>, !fir.ref<f64>) -> ()
! CHECK: omp.terminator
! CHECK: }
@@ -109,8 +109,8 @@ subroutine single_privatization(x, y)
! CHECK: %[[X_PVT_DECL:.*]]:2 = hlfir.declare %[[X_PVT]] {uniq_name = "_QFsingle_privatization2Ex"} : (!fir.ref<f32>) -> (!fir.ref<f32>, !fir.ref<f32>)
! CHECK: %[[Y_PVT:.*]] = fir.alloca f64 {bindc_name = "y", pinned, uniq_name = "_QFsingle_privatization2Ey"}
! CHECK: %[[Y_PVT_DECL:.*]]:2 = hlfir.declare %[[Y_PVT]] {uniq_name = "_QFsingle_privatization2Ey"} : (!fir.ref<f64>) -> (!fir.ref<f64>, !fir.ref<f64>)
-! CHECK: %[[Y_LOAD:.*]] = fir.load %[[Y_DECL]]#1 : !fir.ref<f64>
-! CHECK: fir.store %[[Y_LOAD]] to %[[Y_PVT_DECL]]#1 : !fir.ref<f64>
+! CHECK: %[[Y_LOAD:.*]] = fir.load %[[Y_DECL]]#0 : !fir.ref<f64>
+! CHECK: hlfir.assign %[[Y_LOAD]] to %[[Y_PVT_DECL]]#0 temporary_lhs : f64, !fir.ref<f64>
! CHECK: fir.call @_QPbar(%[[X_PVT_DECL]]#1, %[[Y_PVT_DECL]]#1) fastmath<contract> : (!fir.ref<f32>, !fir.ref<f64>) -> ()
! CHECK: omp.terminator
! CHECK: }
More information about the flang-commits
mailing list