[flang-commits] [flang] [Flang][OpenMP] Port OpenMP single tests to hlfir flow (PR #69877)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Mon Oct 23 06:24:02 PDT 2023


================
@@ -9,13 +9,14 @@
 !CHECK-SAME: (%[[x:.*]]: !fir.ref<i32> {fir.bindc_name = "x"})
 subroutine omp_single(x)
   integer, intent(inout) :: x
+  !CHECK: %[[X_DECL:.*]]:2 = hlfir.declare %[[x]] {fortran_attrs = #fir.var_attrs<intent_inout>, uniq_name = "_QFomp_singleEx"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
   !CHECK: omp.parallel
   !$omp parallel
   !CHECK: omp.single
   !$omp single
-    !CHECK: %[[xval:.*]] = fir.load %[[x]] : !fir.ref<i32>
+  !CHECK: %[[xval:.*]] = fir.load %[[X_DECL]]#0 : !fir.ref<i32>
----------------
kiranchandramohan wrote:

Nit: keep the alignment.

https://github.com/llvm/llvm-project/pull/69877


More information about the flang-commits mailing list