Skip to content

Conversation

@tarunprabhu
Copy link
Contributor

Only some fortran source files in flang/test/Lower/OpenMP have been modified. More cleanups will be performed in subsequent commits.

Only some fortran source files in flang/test/Lower/OpenMP have been modified.
More cleanups will be performed in subsequent commits.
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir flang:openmp labels Dec 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 3, 2025

@llvm/pr-subscribers-flang-openmp

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

Author: Tarun Prabhu (tarunprabhu)

Changes

Only some fortran source files in flang/test/Lower/OpenMP have been modified. More cleanups will be performed in subsequent commits.


Patch is 47.23 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/170302.diff

44 Files Affected:

  • (modified) flang/test/Lower/OpenMP/Todo/reduction-task.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/allocatable-array-bounds.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/allocatable-map.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/atomic-capture.f90 (+3-3)
  • (modified) flang/test/Lower/OpenMP/atomic-read-complex.f90 (+2-2)
  • (modified) flang/test/Lower/OpenMP/atomic-update.f90 (+5-5)
  • (modified) flang/test/Lower/OpenMP/atomic-write-complex.f90 (+4-4)
  • (modified) flang/test/Lower/OpenMP/copyin.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/declare-target-func-and-subr.f90 (+4-4)
  • (modified) flang/test/Lower/OpenMP/default-clause-byref.f90 (+10-10)
  • (modified) flang/test/Lower/OpenMP/default-clause.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/delayed-privatization-private-firstprivate.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/derived-type-map.f90 (+18-18)
  • (modified) flang/test/Lower/OpenMP/distribute.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/generic-loop-rewriting.f90 (+2-2)
  • (modified) flang/test/Lower/OpenMP/host-eval.f90 (+11-11)
  • (modified) flang/test/Lower/OpenMP/lastprivate-iv.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/loop-directive.f90 (+2-2)
  • (modified) flang/test/Lower/OpenMP/map-no-modifier-v60.f90 (-1)
  • (modified) flang/test/Lower/OpenMP/masked_taskloop.f90 (+6-6)
  • (modified) flang/test/Lower/OpenMP/master_taskloop_simd.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/multiple-entry-points.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/parallel-lastprivate-clause-scalar.f90 (+8-8)
  • (modified) flang/test/Lower/OpenMP/parallel-masked-taskloop.f90 (+2-2)
  • (modified) flang/test/Lower/OpenMP/parallel-master-taskloop-simd.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/parallel-reduction-mixed.f90 (+2-2)
  • (modified) flang/test/Lower/OpenMP/parallel-wsloop-firstpriv.f90 (+2-2)
  • (modified) flang/test/Lower/OpenMP/private-commonblock.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/privatize_predetermined_only_when_defined_by_eval.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/sections.f90 (+2-2)
  • (modified) flang/test/Lower/OpenMP/shared-loop.f90 (+4-7)
  • (modified) flang/test/Lower/OpenMP/simd.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/single.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/target-enter-data-default-openmp52.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/task.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/taskgroup-task-array-reduction.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/taskgroup-task_reduction01.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/taskloop-cancel.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/taskloop-grainsize.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/taskloop-numtasks.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/taskloop.f90 (+6-6)
  • (modified) flang/test/Lower/OpenMP/workdistribute-saxpy-two-2d.f90 (+4-4)
  • (modified) flang/test/Lower/OpenMP/workdistribute-scalar-assign.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/wsloop-chunks.f90 (+1-1)
diff --git a/flang/test/Lower/OpenMP/Todo/reduction-task.f90 b/flang/test/Lower/OpenMP/Todo/reduction-task.f90
index b8bfc37d1758f..adc8de00a9b7a 100644
--- a/flang/test/Lower/OpenMP/Todo/reduction-task.f90
+++ b/flang/test/Lower/OpenMP/Todo/reduction-task.f90
@@ -8,5 +8,5 @@ subroutine reduction_task()
 
   !$omp parallel reduction(task, +:i)
   i = i + 1
-  !$omp end parallel 
+  !$omp end parallel
 end subroutine reduction_task
diff --git a/flang/test/Lower/OpenMP/allocatable-array-bounds.f90 b/flang/test/Lower/OpenMP/allocatable-array-bounds.f90
index 0688f0ddc180d..ade197bc51590 100644
--- a/flang/test/Lower/OpenMP/allocatable-array-bounds.f90
+++ b/flang/test/Lower/OpenMP/allocatable-array-bounds.f90
@@ -47,7 +47,7 @@
 subroutine read_write_section()
     integer, allocatable :: sp_read(:)
     integer, allocatable :: sp_write(:)
-    allocate(sp_read(10)) 
+    allocate(sp_read(10))
     allocate(sp_write(10))
     sp_write = (/0,0,0,0,0,0,0,0,0,0/)
     sp_read = (/1,2,3,4,5,6,7,8,9,10/)
diff --git a/flang/test/Lower/OpenMP/allocatable-map.f90 b/flang/test/Lower/OpenMP/allocatable-map.f90
index 114967526b8d5..e1c4694d7d6b7 100644
--- a/flang/test/Lower/OpenMP/allocatable-map.f90
+++ b/flang/test/Lower/OpenMP/allocatable-map.f90
@@ -6,7 +6,7 @@
 !HLFIRDIALECT: %[[POINTER_MAP:.*]] = omp.map.info var_ptr(%[[POINTER]]#1 : !fir.ref<!fir.box<!fir.ptr<i32>>>, !fir.box<!fir.ptr<i32>>) map_clauses(always, to) capture(ByRef) members(%[[POINTER_MAP_MEMBER]] : [0] : !fir.llvm_ptr<!fir.ref<i32>>) -> !fir.ref<!fir.box<!fir.ptr<i32>>> {name = "point"}
 !HLFIRDIALECT: omp.target map_entries(%[[POINTER_MAP]] -> {{.*}}, %[[POINTER_MAP_MEMBER]] -> {{.*}} : !fir.ref<!fir.box<!fir.ptr<i32>>>, !fir.llvm_ptr<!fir.ref<i32>>) {
 subroutine pointer_routine()
-    integer, pointer :: point 
+    integer, pointer :: point
 !$omp target map(tofrom:point)
     point = 1
 !$omp end target
diff --git a/flang/test/Lower/OpenMP/atomic-capture.f90 b/flang/test/Lower/OpenMP/atomic-capture.f90
index 14fd0c942a9b4..f561deac91298 100644
--- a/flang/test/Lower/OpenMP/atomic-capture.f90
+++ b/flang/test/Lower/OpenMP/atomic-capture.f90
@@ -7,7 +7,7 @@
 
 
 program OmpAtomicCapture
-    use omp_lib                                                                                                       
+    use omp_lib
 
 !CHECK: %[[VAL_X_ALLOCA:.*]] = fir.alloca i32 {bindc_name = "x", uniq_name = "_QFEx"}
 !CHECK: %[[VAL_X_DECLARE:.*]]:2 = hlfir.declare %[[VAL_X_ALLOCA]] {{.*}}
@@ -25,7 +25,7 @@ program OmpAtomicCapture
 !CHECK: omp.atomic.read %[[VAL_X_DECLARE]]#0 = %[[VAL_Y_DECLARE]]#0 : !fir.ref<i32>, !fir.ref<i32>, i32
 !CHECK: }
     !$omp atomic hint(omp_sync_hint_uncontended) capture
-        y = x * y 
+        y = x * y
         x = y
     !$omp end atomic
 
@@ -43,7 +43,7 @@ program OmpAtomicCapture
 !CHECK: }
     !$omp atomic hint(omp_lock_hint_nonspeculative) capture acquire
         x = y
-        y = 2 * 10 + (8 - x) 
+        y = 2 * 10 + (8 - x)
     !$omp end atomic
 end program
 
diff --git a/flang/test/Lower/OpenMP/atomic-read-complex.f90 b/flang/test/Lower/OpenMP/atomic-read-complex.f90
index 2f51f03820926..cd20c5d0316b7 100644
--- a/flang/test/Lower/OpenMP/atomic-read-complex.f90
+++ b/flang/test/Lower/OpenMP/atomic-read-complex.f90
@@ -15,7 +15,7 @@ program atomic_read_complex
   complex(4) :: c41, c42
   ! Test complex(8) - double precision (16 bytes)
   complex(8) :: c81, c82
-  
+
   c42 = (1.0_4, 1.0_4)
   c82 = (1.0_8, 1.0_8)
 
@@ -25,7 +25,7 @@ program atomic_read_complex
   ! CHECK: call void @__atomic_load(i64 8, ptr {{.*}}, ptr {{.*}}, i32 {{.*}})
 !$omp atomic read
   c41 = c42
-  
+
   ! Double precision complex: 16 bytes (this was broken before the fix)
   ! CHECK: call void @__atomic_load(i64 16, ptr {{.*}}, ptr {{.*}}, i32 {{.*}})
 !$omp atomic read
diff --git a/flang/test/Lower/OpenMP/atomic-update.f90 b/flang/test/Lower/OpenMP/atomic-update.f90
index f88bbea6fca85..05adee312dd6a 100644
--- a/flang/test/Lower/OpenMP/atomic-update.f90
+++ b/flang/test/Lower/OpenMP/atomic-update.f90
@@ -73,7 +73,7 @@ program OmpAtomicUpdate
 !CHECK: omp.yield(%[[TEMP]] : i32)
 !CHECK: }
    !$omp atomic update
-        a = a + b 
+        a = a + b
 
 !CHECK: %[[VAL_c1:.*]] = arith.constant 1 : i32
 !CHECK: omp.atomic.update %[[VAL_Y_DECLARE]]#0 : !fir.ref<i32> {
@@ -81,7 +81,7 @@ program OmpAtomicUpdate
 !CHECK: %[[TEMP:.*]] = arith.addi %[[ARG]], %[[VAL_c1]] : i32
 !CHECK: omp.yield(%[[TEMP]] : i32)
 !CHECK: }
-   !$omp atomic 
+   !$omp atomic
         y = y + 1
 
 !CHECK: %[[VAL_X_LOADED:.*]] = fir.load %[[VAL_X_DECLARE]]#0 : !fir.ref<i32>
@@ -91,7 +91,7 @@ program OmpAtomicUpdate
 !CHECK: omp.yield(%[[TEMP]] : i32)
 !CHECK: }
     !$omp atomic update
-        z = x * z 
+        z = x * z
 
 !CHECK: %[[VAL_c1:.*]] = arith.constant 1 : i32
 !CHECK: omp.atomic.update hint(uncontended) memory_order(relaxed) %[[VAL_X_DECLARE]]#0 : !fir.ref<i32> {
@@ -110,7 +110,7 @@ program OmpAtomicUpdate
 !CHECK:  %[[TEMP:.*]] = arith.select {{.*}} : i32
 !CHECK:  omp.yield(%[[TEMP]] : i32)
 !CHECK: }
-    !$omp atomic update relaxed 
+    !$omp atomic update relaxed
         y = max(y, c, d)
 
 !CHECK: %[[VAL_X_LOADED:.*]] = fir.load %[[VAL_X_DECLARE]]#0 : !fir.ref<i32>
@@ -211,7 +211,7 @@ program OmpAtomicUpdate
 !CHECK: %[[RESULT:.*]] = fir.convert %[[EXT]] : (f32) -> i32
 !CHECK: omp.yield(%[[RESULT]] : i32)
   !$omp atomic update
-    w = w + g  
+    w = w + g
 end program OmpAtomicUpdate
 
 ! Check that the clean-ups associated with the function call
diff --git a/flang/test/Lower/OpenMP/atomic-write-complex.f90 b/flang/test/Lower/OpenMP/atomic-write-complex.f90
index 48cfe26ca5a49..4e975bf2c9c6a 100644
--- a/flang/test/Lower/OpenMP/atomic-write-complex.f90
+++ b/flang/test/Lower/OpenMP/atomic-write-complex.f90
@@ -13,19 +13,19 @@ program atomic_write_complex
 
   ! Test complex(4) - single precision (8 bytes)
   complex(4) :: c41, c42
-  ! Test complex(8) - double precision (16 bytes)  
+  ! Test complex(8) - double precision (16 bytes)
   complex(8) :: c81, c82
-  
+
   c42 = (1.0_4, 1.0_4)
   c82 = (1.0_8, 1.0_8)
 
   ! CHECK-LABEL: define {{.*}} @_QQmain
-  
+
   ! Single precision complex: 8 bytes
   ! CHECK: call void @__atomic_store(i64 8, ptr {{.*}}, ptr {{.*}}, i32 {{.*}})
 !$omp atomic write
   c41 = c42
-  
+
   ! Double precision complex: 16 bytes (this was broken before the fix)
   ! CHECK: call void @__atomic_store(i64 16, ptr {{.*}}, ptr {{.*}}, i32 {{.*}})
 !$omp atomic write
diff --git a/flang/test/Lower/OpenMP/copyin.f90 b/flang/test/Lower/OpenMP/copyin.f90
index 129d8bde4dd7b..6cdbbd2c12e6e 100644
--- a/flang/test/Lower/OpenMP/copyin.f90
+++ b/flang/test/Lower/OpenMP/copyin.f90
@@ -335,7 +335,7 @@ subroutine common_2()
   integer :: y
   common /d/ x, y
   !$omp threadprivate(/d/)
-  
+
   !$omp parallel do copyin(/d/)
      do i = 1, x
         y = y + i
diff --git a/flang/test/Lower/OpenMP/declare-target-func-and-subr.f90 b/flang/test/Lower/OpenMP/declare-target-func-and-subr.f90
index 4abf750cf735a..d6175dd8730c2 100644
--- a/flang/test/Lower/OpenMP/declare-target-func-and-subr.f90
+++ b/flang/test/Lower/OpenMP/declare-target-func-and-subr.f90
@@ -1,8 +1,8 @@
 !RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 %s -o - | FileCheck %s --check-prefixes ALL,HOST
 !RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 -fopenmp-is-device %s -o - | FileCheck %s --check-prefixes ALL,DEVICE
 
-! Check specification valid forms of declare target with functions 
-! utilising device_type and to clauses as well as the default 
+! Check specification valid forms of declare target with functions
+! utilising device_type and to clauses as well as the default
 ! zero clause declare target
 
 ! DEVICE-LABEL: func.func @_QPfunc_t_device()
@@ -94,8 +94,8 @@ END FUNCTION FUNC_NAME_AS_RESULT
 
 !! -----
 
-! Check specification valid forms of declare target with subroutines 
-! utilising device_type and to clauses as well as the default 
+! Check specification valid forms of declare target with subroutines
+! utilising device_type and to clauses as well as the default
 ! zero clause declare target
 
 ! DEVICE-LABEL: func.func @_QPsubr_t_device()
diff --git a/flang/test/Lower/OpenMP/default-clause-byref.f90 b/flang/test/Lower/OpenMP/default-clause-byref.f90
index af51c4cc3e814..0d473af7f8b88 100644
--- a/flang/test/Lower/OpenMP/default-clause-byref.f90
+++ b/flang/test/Lower/OpenMP/default-clause-byref.f90
@@ -197,21 +197,21 @@ subroutine nested_default_clause_tests
 !CHECK: }
 !CHECK: omp.terminator
 !CHECK: }
-    !$omp parallel  firstprivate(x) private(y) shared(w) default(private)  
+    !$omp parallel  firstprivate(x) private(y) shared(w) default(private)
         !$omp parallel default(private)
            y = 20
-           x = 10 
-        !$omp end parallel 
+           x = 10
+        !$omp end parallel
 
-        !$omp parallel default(firstprivate) shared(y) private(w) 
+        !$omp parallel default(firstprivate) shared(y) private(w)
             y = 30
-            w = 40 
+            w = 40
             z = 50
             k = 40
         !$omp end parallel
     !$omp end parallel
-    
-    
+
+
 !CHECK: omp.parallel private({{.*}} {{.*}}#0 -> %[[PRIVATE_X:.*]], {{.*}} {{.*}}#0 -> %[[PRIVATE_Y:.*]], {{.*}} {{.*}}#0 -> %[[PRIVATE_Z:.*]] : {{.*}}) {
 !CHECK: %[[PRIVATE_X_DECL:.*]]:2 = hlfir.declare %[[PRIVATE_X]] {uniq_name = "_QFnested_default_clause_testsEx"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
 !CHECK: %[[PRIVATE_Y_DECL:.*]]:2 = hlfir.declare %[[PRIVATE_Y]] {uniq_name = "_QFnested_default_clause_testsEy"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
@@ -240,8 +240,8 @@ subroutine nested_default_clause_tests
         !$omp parallel default(private) shared(z)
             w = x + z
         !$omp end parallel
-    !$omp end parallel    
-    
+    !$omp end parallel
+
 !CHECK: omp.parallel private({{.*}} {{.*}}#0 -> %[[PRIVATE_X:.*]], {{.*}} {{.*}}#0 -> %[[PRIVATE_Y:.*]], {{.*}} {{.*}}#0 -> %[[PRIVATE_W:.*]], {{.*}} {{.*}}#0 -> %[[PRIVATE_Z:.*]] : {{.*}}) {
 !CHECK: %[[PRIVATE_X_DECL:.*]]:2 = hlfir.declare %[[PRIVATE_X]] {uniq_name = "_QFnested_default_clause_testsEx"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
 !CHECK: %[[PRIVATE_Y_DECL:.*]]:2 = hlfir.declare %[[PRIVATE_Y]] {uniq_name = "_QFnested_default_clause_testsEy"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
@@ -283,7 +283,7 @@ subroutine nested_default_clause_tests
 !CHECK: omp.terminator
 !CHECK: }
 !CHECK: return
-!CHECK: } 
+!CHECK: }
 	!$omp parallel default(firstprivate)
 		!$omp single
 			x = y
diff --git a/flang/test/Lower/OpenMP/default-clause.f90 b/flang/test/Lower/OpenMP/default-clause.f90
index 77725836a0a04..c16d19c129b8f 100644
--- a/flang/test/Lower/OpenMP/default-clause.f90
+++ b/flang/test/Lower/OpenMP/default-clause.f90
@@ -432,7 +432,7 @@ subroutine skipped_default_clause_checks()
 !CHECK:   %[[VAR_X_DECLARE_INNER:.*]] = hlfir.declare %[[CONVERT_INNER]] storage(%[[BLK_THREADPRIVATE_INNER]][0]) {uniq_name = "_QFthreadprivate_with_defaultEx"} : (!fir.ref<i32>, !fir.ref<!fir.array<4xi8>>) -> (!fir.ref<i32>, !fir.ref<i32>)
 subroutine threadprivate_with_default
         integer :: x
-        common /blk/ x 
+        common /blk/ x
         !$omp threadprivate (/blk/)
 
         !$omp parallel do default(private)
diff --git a/flang/test/Lower/OpenMP/delayed-privatization-private-firstprivate.f90 b/flang/test/Lower/OpenMP/delayed-privatization-private-firstprivate.f90
index ad53703d3122e..d79f97d9bc9e9 100644
--- a/flang/test/Lower/OpenMP/delayed-privatization-private-firstprivate.f90
+++ b/flang/test/Lower/OpenMP/delayed-privatization-private-firstprivate.f90
@@ -31,6 +31,6 @@ subroutine delayed_privatization_private_firstprivate
 ! CHECK:  %[[VAR2_DECL:.*]]:2 = hlfir.declare %[[VAR2_ALLOC]]
 
 ! CHECK:  omp.parallel private(
-! CHECK-SAME: @[[VAR1_PRIVATIZER_SYM]] %[[VAR1_DECL]]#0 -> %{{[^,]+}}, 
+! CHECK-SAME: @[[VAR1_PRIVATIZER_SYM]] %[[VAR1_DECL]]#0 -> %{{[^,]+}},
 ! CHECK-SAME: @[[VAR2_PRIVATIZER_SYM]] %[[VAR2_DECL]]#0 -> %{{.*}} :
 ! CHECK-SAME: !fir.ref<i32>, !fir.ref<i32>) {
diff --git a/flang/test/Lower/OpenMP/derived-type-map.f90 b/flang/test/Lower/OpenMP/derived-type-map.f90
index 3b39b694c37b2..fb4b88a00d0af 100644
--- a/flang/test/Lower/OpenMP/derived-type-map.f90
+++ b/flang/test/Lower/OpenMP/derived-type-map.f90
@@ -12,8 +12,8 @@ subroutine mapType_derived_implicit
       integer(4) :: array(10)
       integer(4) :: int
     end type scalar_and_array
-    type(scalar_and_array) :: scalar_arr 
-    
+    type(scalar_and_array) :: scalar_arr
+
     !$omp target
        scalar_arr%int = 1
     !$omp end target
@@ -49,8 +49,8 @@ subroutine mapType_derived_explicit
       integer(4) :: array(10)
       integer(4) :: int
     end type scalar_and_array
-    type(scalar_and_array) :: scalar_arr 
-    
+    type(scalar_and_array) :: scalar_arr
+
     !$omp target map(tofrom: scalar_arr)
        scalar_arr%int = 1
     !$omp end target
@@ -69,8 +69,8 @@ subroutine mapType_derived_explicit_single_member
       integer(4) :: array(10)
       integer(4) :: int
     end type scalar_and_array
-    type(scalar_and_array) :: scalar_arr 
-    
+    type(scalar_and_array) :: scalar_arr
+
     !$omp target map(tofrom: scalar_arr%array)
        scalar_arr%array(1) = 1
     !$omp end target
@@ -90,13 +90,13 @@ subroutine mapType_derived_explicit_multiple_members
       integer(4) :: array(10)
       integer(4) :: int
     end type scalar_and_array
-    type(scalar_and_array) :: scalar_arr 
-    
+    type(scalar_and_array) :: scalar_arr
+
     !$omp target map(tofrom: scalar_arr%int, scalar_arr%real)
        scalar_arr%int = 1
     !$omp end target
 end subroutine mapType_derived_explicit_multiple_members
-  
+
 !CHECK: %[[ALLOCA:.*]] = fir.alloca !fir.type<_QFmaptype_derived_explicit_member_with_boundsTscalar_and_array{real:f32,array:!fir.array<10xi32>,int:i32}> {bindc_name = "scalar_arr", uniq_name = "_QFmaptype_derived_explicit_member_with_boundsEscalar_arr"}
 !CHECK: %[[DECLARE:.*]]:2 = hlfir.declare %[[ALLOCA]] {uniq_name = "_QFmaptype_derived_explicit_member_with_boundsEscalar_arr"} : (!fir.ref<!fir.type<_QFmaptype_derived_explicit_member_with_boundsTscalar_and_array{real:f32,array:!fir.array<10xi32>,int:i32}>>) -> (!fir.ref<!fir.type<_QFmaptype_derived_explicit_member_with_boundsTscalar_and_array{real:f32,array:!fir.array<10xi32>,int:i32}>>, !fir.ref<!fir.type<_QFmaptype_derived_explicit_member_with_boundsTscalar_and_array{real:f32,array:!fir.array<10xi32>,int:i32}>>)
 !CHECK: %[[MEMBER:.*]] = hlfir.designate %[[DECLARE]]#0{"array"}   shape %{{.*}} : (!fir.ref<!fir.type<_QFmaptype_derived_explicit_member_with_boundsTscalar_and_array{real:f32,array:!fir.array<10xi32>,int:i32}>>, !fir.shape<1>) -> !fir.ref<!fir.array<10xi32>>
@@ -113,8 +113,8 @@ subroutine mapType_derived_explicit_member_with_bounds
       integer(4) :: array(10)
       integer(4) :: int
     end type scalar_and_array
-    type(scalar_and_array) :: scalar_arr 
-    
+    type(scalar_and_array) :: scalar_arr
+
     !$omp target map(tofrom: scalar_arr%array(2:5))
        scalar_arr%array(3) = 3
     !$omp end target
@@ -141,8 +141,8 @@ subroutine mapType_derived_nested_explicit_single_member
     type(nested) :: nest
     integer(4) :: int
   end type scalar_and_array
-  
-  type(scalar_and_array) :: scalar_arr 
+
+  type(scalar_and_array) :: scalar_arr
 
   !$omp target map(tofrom: scalar_arr%nest%array)
     scalar_arr%nest%array(1) = 1
@@ -173,7 +173,7 @@ subroutine mapType_derived_nested_explicit_multiple_members
     integer(4) :: int
   end type scalar_and_array
 
-  type(scalar_and_array) :: scalar_arr 
+  type(scalar_and_array) :: scalar_arr
 
   !$omp target map(tofrom: scalar_arr%nest%int, scalar_arr%nest%real)
     scalar_arr%nest%int = 1
@@ -205,9 +205,9 @@ subroutine mapType_derived_nested_explicit_member_with_bounds
     type(nested) :: nest
     integer(4) :: int
   end type scalar_and_array
-  
-  type(scalar_and_array) :: scalar_arr 
-  
+
+  type(scalar_and_array) :: scalar_arr
+
   !$omp target map(tofrom: scalar_arr%nest%array(2:5))
     scalar_arr%nest%array(3) = 3
   !$omp end target
@@ -239,7 +239,7 @@ subroutine mapType_multilpe_derived_nested_explicit_member
     type(nested) :: nest
     integer(4) :: int
   end type scalar_and_array
-  
+
   type(scalar_and_array) :: scalar_arr1
   type(scalar_and_array) :: scalar_arr2
 
diff --git a/flang/test/Lower/OpenMP/distribute.f90 b/flang/test/Lower/OpenMP/distribute.f90
index ea57d35b964b4..bd0e220c1989c 100644
--- a/flang/test/Lower/OpenMP/distribute.f90
+++ b/flang/test/Lower/OpenMP/distribute.f90
@@ -104,7 +104,7 @@ subroutine distribute_allocate()
   ! CHECK-NEXT: omp.loop_nest
   do i = 1, 10
     x = i
-    ! CHECK: omp.yield 
+    ! CHECK: omp.yield
   end do
 
   !$omp end distribute
diff --git a/flang/test/Lower/OpenMP/generic-loop-rewriting.f90 b/flang/test/Lower/OpenMP/generic-loop-rewriting.f90
index eaf31e3ffb779..75731a6ec6ff2 100644
--- a/flang/test/Lower/OpenMP/generic-loop-rewriting.f90
+++ b/flang/test/Lower/OpenMP/generic-loop-rewriting.f90
@@ -38,12 +38,12 @@ end subroutine target_teams_loop
 !CHECK:             %[[UB:.*]] = arith.constant 10 : i32
 !CHECK:             %[[STEP:.*]] = arith.constant 1 : i32
 
-!CHECK:             omp.parallel private(@{{.*}} %[[I_DECL]]#0 
+!CHECK:             omp.parallel private(@{{.*}} %[[I_DECL]]#0
 !CHECK-SAME:          -> %[[I_PRIV_ARG:[^[:space:]]+]] : !fir.ref<i32>) {
 !CHECK:               omp.distribute {
 !CHECK:                 omp.wsloop {
 
-!CHECK:                   omp.loop_nest (%{{.*}}) : i32 = 
+!CHECK:                   omp.loop_nest (%{{.*}}) : i32 =
 !CHECK-SAME:                (%[[LB]]) to (%[[UB]]) inclusive step (%[[STEP]]) {
 !CHECK:                     %[[I_PRIV_DECL:.*]]:2 = hlfir.declare %[[I_PRIV_ARG]]
 !CHECK:                     hlfir.assign %{{.*}} to %[[I_PRIV_DECL]]#0 : i32, !fir.ref<i32>
diff --git a/flang/test/Lower/OpenMP/host-eval.f90 b/flang/test/Lower/OpenMP/host-eval.f90
index fe5b9597f8620..cd759a988e4f5 100644
--- a/flang/test/Lower/OpenMP/host-eval.f90
+++ b/flang/test/Lower/OpenMP/host-eval.f90
@@ -7,7 +7,7 @@ subroutine teams()
   ! BOTH: omp.target
 
   ! HOST-SAME: host_eval(%{{.*}} -> %[[NUM_TEAMS:.*]], %{{.*}} -> %[[THREAD_LIMIT:.*]] : i32, i32)
-  
+
   ! DEVICE-NOT: host_eval({{.*}})
   ! DEVICE-SAME: {
   !$omp target
@@ -32,9 +32,9 @@ end subroutine teams
 ! BOTH-LABEL: func.func @_QPdistribute_parallel_do
 subroutine distribute_parallel_do()
   ! BOTH: omp.target
-  
+
   ! HOST-SAME: host_eval(%{{.*}} -> %[[LB:.*]], %{{.*}} -> %[[UB:.*]], %{{.*}} -> %[[STEP:.*]], %{{.*}} -> %[[NUM_THREADS:.*]] : i32, i32, i32, i32)
-  
+
   ! DEVICE-NOT: host_eval({{.*}})
   ! DEVICE-SAME: {
 
@@ -94,9 +94,9 @@ end subroutine distribute_parallel_do
 ! BOTH-LABEL: func.func @_QPdistribute_parallel_do_simd
 subroutine distribute_parallel_do_simd()
   ! BOTH: omp.target
-  
+
   ! HOST-SAME: host_eval(%{{.*}} -> %[[LB:.*]], %{{.*}} -> %[[UB:.*]], %{{.*}} -> %[[STEP:.*]], %{{.*}} -> %[[NUM_THREADS:.*]] : i32, i32, i32, i32)
-  
+
   ! DEVICE-NOT: host_eval({{.*}})
   ! DEVICE-SAME: {
 
@@ -159,9 +159,9 @@ end subroutine distribute_parallel_do_simd
 ! BOTH-LABEL: func.func @_QPdistribute
 subroutine distribute()
   ! BOTH: omp.target
-  
+
   ! HOST-SAME: host_eval(%{{.*}} -> %[[LB:.*]], %{{.*}} -> %[[UB:.*]], %{{.*}} -> %[[STEP:.*]] : i32, i32, i32)
-  
+
   ! DEVICE-NOT: host_eval({{.*}})
   ! DEVICE-SAME: {
 
@@ -209,9 +209,9 @@ end subroutine distribute
 ! BOTH-LABEL: func.func @_QPdistribute_simd
 subroutine distribute_simd()
   ! BOTH: omp.target
-  
+
   ! HOST-SAME: host_eval(%{{.*}} -> %[[LB:.*]], %{{.*}} -> %[[UB:.*]], %{{.*}} -> %[[STEP:.*]] : i32, i32, i32)
-  
+
   ! DEVICE-NOT: host_eval({{.*}})
   ! DEVICE-SAME: {
 
@@ -262,9 +262,9 @@ end subroutine distribute_simd
 ! BOTH-LABEL: func.func @_QPloop
 subroutine loop()
   ! BOTH: omp.target
-  
+
   ! HOST-SAME: host_eval(%{{.*}} -> %[[LB:.*]], %{{.*}} -> %[[UB:.*]], %{{.*}} -> %[[STEP:.*]] : i32, i32, i32)
-  
+
   ! DEVICE-NOT: host_eval({{.*}})
   ! DEVICE-SAME: {
 
diff --git a/flang/test/Lower/OpenMP/lastprivate-iv.f90 b/flang/test/Lower/OpenMP/lastprivate-iv.f90
index 114ea6c0f200c..795838d814ac9 100644
--- a/flang/test/Lower/OpenMP/lastprivate-iv.f90
+++ b/flang/test/Lower/OpenMP/lastprivate-iv.f90
@@ -96,7 +96,7 @@ subroutine lastprivate_iv_i1
 end subroutine
 
 !CHECK:    omp.wsloo...
[truncated]

@tarunprabhu tarunprabhu merged commit e5675a4 into llvm:main Dec 3, 2025
13 checks passed
@tarunprabhu tarunprabhu deleted the test-strip-ws-9 branch December 3, 2025 21:54
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.

3 participants