Skip to content

Commit de7a070

Browse files
committed
[flang][NFC] Strip trailing whitespace from tests (9 of N)
Only some fortran source files in flang/test/Lower/OpenMP have been modified. More cleanups will be performed in subsequent commits.
1 parent f83f6f5 commit de7a070

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+121
-125
lines changed

flang/test/Lower/OpenMP/Todo/reduction-task.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ subroutine reduction_task()
88

99
!$omp parallel reduction(task, +:i)
1010
i = i + 1
11-
!$omp end parallel
11+
!$omp end parallel
1212
end subroutine reduction_task

flang/test/Lower/OpenMP/allocatable-array-bounds.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
subroutine read_write_section()
4848
integer, allocatable :: sp_read(:)
4949
integer, allocatable :: sp_write(:)
50-
allocate(sp_read(10))
50+
allocate(sp_read(10))
5151
allocate(sp_write(10))
5252
sp_write = (/0,0,0,0,0,0,0,0,0,0/)
5353
sp_read = (/1,2,3,4,5,6,7,8,9,10/)

flang/test/Lower/OpenMP/allocatable-map.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
!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"}
77
!HLFIRDIALECT: omp.target map_entries(%[[POINTER_MAP]] -> {{.*}}, %[[POINTER_MAP_MEMBER]] -> {{.*}} : !fir.ref<!fir.box<!fir.ptr<i32>>>, !fir.llvm_ptr<!fir.ref<i32>>) {
88
subroutine pointer_routine()
9-
integer, pointer :: point
9+
integer, pointer :: point
1010
!$omp target map(tofrom:point)
1111
point = 1
1212
!$omp end target

flang/test/Lower/OpenMP/atomic-capture.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
program OmpAtomicCapture
10-
use omp_lib
10+
use omp_lib
1111

1212
!CHECK: %[[VAL_X_ALLOCA:.*]] = fir.alloca i32 {bindc_name = "x", uniq_name = "_QFEx"}
1313
!CHECK: %[[VAL_X_DECLARE:.*]]:2 = hlfir.declare %[[VAL_X_ALLOCA]] {{.*}}
@@ -25,7 +25,7 @@ program OmpAtomicCapture
2525
!CHECK: omp.atomic.read %[[VAL_X_DECLARE]]#0 = %[[VAL_Y_DECLARE]]#0 : !fir.ref<i32>, !fir.ref<i32>, i32
2626
!CHECK: }
2727
!$omp atomic hint(omp_sync_hint_uncontended) capture
28-
y = x * y
28+
y = x * y
2929
x = y
3030
!$omp end atomic
3131

@@ -43,7 +43,7 @@ program OmpAtomicCapture
4343
!CHECK: }
4444
!$omp atomic hint(omp_lock_hint_nonspeculative) capture acquire
4545
x = y
46-
y = 2 * 10 + (8 - x)
46+
y = 2 * 10 + (8 - x)
4747
!$omp end atomic
4848
end program
4949

flang/test/Lower/OpenMP/atomic-read-complex.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ program atomic_read_complex
1515
complex(4) :: c41, c42
1616
! Test complex(8) - double precision (16 bytes)
1717
complex(8) :: c81, c82
18-
18+
1919
c42 = (1.0_4, 1.0_4)
2020
c82 = (1.0_8, 1.0_8)
2121

@@ -25,7 +25,7 @@ program atomic_read_complex
2525
! CHECK: call void @__atomic_load(i64 8, ptr {{.*}}, ptr {{.*}}, i32 {{.*}})
2626
!$omp atomic read
2727
c41 = c42
28-
28+
2929
! Double precision complex: 16 bytes (this was broken before the fix)
3030
! CHECK: call void @__atomic_load(i64 16, ptr {{.*}}, ptr {{.*}}, i32 {{.*}})
3131
!$omp atomic read

flang/test/Lower/OpenMP/atomic-update.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ program OmpAtomicUpdate
7373
!CHECK: omp.yield(%[[TEMP]] : i32)
7474
!CHECK: }
7575
!$omp atomic update
76-
a = a + b
76+
a = a + b
7777

7878
!CHECK: %[[VAL_c1:.*]] = arith.constant 1 : i32
7979
!CHECK: omp.atomic.update %[[VAL_Y_DECLARE]]#0 : !fir.ref<i32> {
8080
!CHECK: ^bb0(%[[ARG:.*]]: i32):
8181
!CHECK: %[[TEMP:.*]] = arith.addi %[[ARG]], %[[VAL_c1]] : i32
8282
!CHECK: omp.yield(%[[TEMP]] : i32)
8383
!CHECK: }
84-
!$omp atomic
84+
!$omp atomic
8585
y = y + 1
8686

8787
!CHECK: %[[VAL_X_LOADED:.*]] = fir.load %[[VAL_X_DECLARE]]#0 : !fir.ref<i32>
@@ -91,7 +91,7 @@ program OmpAtomicUpdate
9191
!CHECK: omp.yield(%[[TEMP]] : i32)
9292
!CHECK: }
9393
!$omp atomic update
94-
z = x * z
94+
z = x * z
9595

9696
!CHECK: %[[VAL_c1:.*]] = arith.constant 1 : i32
9797
!CHECK: omp.atomic.update hint(uncontended) memory_order(relaxed) %[[VAL_X_DECLARE]]#0 : !fir.ref<i32> {
@@ -110,7 +110,7 @@ program OmpAtomicUpdate
110110
!CHECK: %[[TEMP:.*]] = arith.select {{.*}} : i32
111111
!CHECK: omp.yield(%[[TEMP]] : i32)
112112
!CHECK: }
113-
!$omp atomic update relaxed
113+
!$omp atomic update relaxed
114114
y = max(y, c, d)
115115

116116
!CHECK: %[[VAL_X_LOADED:.*]] = fir.load %[[VAL_X_DECLARE]]#0 : !fir.ref<i32>
@@ -211,7 +211,7 @@ program OmpAtomicUpdate
211211
!CHECK: %[[RESULT:.*]] = fir.convert %[[EXT]] : (f32) -> i32
212212
!CHECK: omp.yield(%[[RESULT]] : i32)
213213
!$omp atomic update
214-
w = w + g
214+
w = w + g
215215
end program OmpAtomicUpdate
216216

217217
! Check that the clean-ups associated with the function call

flang/test/Lower/OpenMP/atomic-write-complex.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ program atomic_write_complex
1313

1414
! Test complex(4) - single precision (8 bytes)
1515
complex(4) :: c41, c42
16-
! Test complex(8) - double precision (16 bytes)
16+
! Test complex(8) - double precision (16 bytes)
1717
complex(8) :: c81, c82
18-
18+
1919
c42 = (1.0_4, 1.0_4)
2020
c82 = (1.0_8, 1.0_8)
2121

2222
! CHECK-LABEL: define {{.*}} @_QQmain
23-
23+
2424
! Single precision complex: 8 bytes
2525
! CHECK: call void @__atomic_store(i64 8, ptr {{.*}}, ptr {{.*}}, i32 {{.*}})
2626
!$omp atomic write
2727
c41 = c42
28-
28+
2929
! Double precision complex: 16 bytes (this was broken before the fix)
3030
! CHECK: call void @__atomic_store(i64 16, ptr {{.*}}, ptr {{.*}}, i32 {{.*}})
3131
!$omp atomic write

flang/test/Lower/OpenMP/copyin.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ subroutine common_2()
335335
integer :: y
336336
common /d/ x, y
337337
!$omp threadprivate(/d/)
338-
338+
339339
!$omp parallel do copyin(/d/)
340340
do i = 1, x
341341
y = y + i

flang/test/Lower/OpenMP/declare-target-func-and-subr.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
!RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 %s -o - | FileCheck %s --check-prefixes ALL,HOST
22
!RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=52 -fopenmp-is-device %s -o - | FileCheck %s --check-prefixes ALL,DEVICE
33

4-
! Check specification valid forms of declare target with functions
5-
! utilising device_type and to clauses as well as the default
4+
! Check specification valid forms of declare target with functions
5+
! utilising device_type and to clauses as well as the default
66
! zero clause declare target
77

88
! DEVICE-LABEL: func.func @_QPfunc_t_device()
@@ -94,8 +94,8 @@ END FUNCTION FUNC_NAME_AS_RESULT
9494

9595
!! -----
9696

97-
! Check specification valid forms of declare target with subroutines
98-
! utilising device_type and to clauses as well as the default
97+
! Check specification valid forms of declare target with subroutines
98+
! utilising device_type and to clauses as well as the default
9999
! zero clause declare target
100100

101101
! DEVICE-LABEL: func.func @_QPsubr_t_device()

flang/test/Lower/OpenMP/default-clause-byref.f90

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -197,21 +197,21 @@ subroutine nested_default_clause_tests
197197
!CHECK: }
198198
!CHECK: omp.terminator
199199
!CHECK: }
200-
!$omp parallel firstprivate(x) private(y) shared(w) default(private)
200+
!$omp parallel firstprivate(x) private(y) shared(w) default(private)
201201
!$omp parallel default(private)
202202
y = 20
203-
x = 10
204-
!$omp end parallel
203+
x = 10
204+
!$omp end parallel
205205

206-
!$omp parallel default(firstprivate) shared(y) private(w)
206+
!$omp parallel default(firstprivate) shared(y) private(w)
207207
y = 30
208-
w = 40
208+
w = 40
209209
z = 50
210210
k = 40
211211
!$omp end parallel
212212
!$omp end parallel
213-
214-
213+
214+
215215
!CHECK: omp.parallel private({{.*}} {{.*}}#0 -> %[[PRIVATE_X:.*]], {{.*}} {{.*}}#0 -> %[[PRIVATE_Y:.*]], {{.*}} {{.*}}#0 -> %[[PRIVATE_Z:.*]] : {{.*}}) {
216216
!CHECK: %[[PRIVATE_X_DECL:.*]]:2 = hlfir.declare %[[PRIVATE_X]] {uniq_name = "_QFnested_default_clause_testsEx"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
217217
!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
240240
!$omp parallel default(private) shared(z)
241241
w = x + z
242242
!$omp end parallel
243-
!$omp end parallel
244-
243+
!$omp end parallel
244+
245245
!CHECK: omp.parallel private({{.*}} {{.*}}#0 -> %[[PRIVATE_X:.*]], {{.*}} {{.*}}#0 -> %[[PRIVATE_Y:.*]], {{.*}} {{.*}}#0 -> %[[PRIVATE_W:.*]], {{.*}} {{.*}}#0 -> %[[PRIVATE_Z:.*]] : {{.*}}) {
246246
!CHECK: %[[PRIVATE_X_DECL:.*]]:2 = hlfir.declare %[[PRIVATE_X]] {uniq_name = "_QFnested_default_clause_testsEx"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
247247
!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
283283
!CHECK: omp.terminator
284284
!CHECK: }
285285
!CHECK: return
286-
!CHECK: }
286+
!CHECK: }
287287
!$omp parallel default(firstprivate)
288288
!$omp single
289289
x = y

0 commit comments

Comments
 (0)