Skip to content

Commit 38c1a58

Browse files
authored
[flang][NFC] Strip trailing whitespace from tests (6 of N)
Only the fortran source files in flang/test/Lower/PowerPC and some in flang/test/Lower have been modified. The other files in the directory will be cleaned up in subsequent commits
1 parent 7aeb264 commit 38c1a58

19 files changed

+41
-42
lines changed

flang/test/Lower/PowerPC/ppc-vec-load-elem-order.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ subroutine vec_xl_testi8a(arg1, arg2, res)
394394
vector(integer(1)) :: res
395395
res = vec_xl(arg1, arg2)
396396

397-
397+
398398
! LLVMIR: %[[arg1:.*]] = load i8, ptr %0, align 1
399399
! LLVMIR: %[[addr:.*]] = getelementptr i8, ptr %1, i8 %[[arg1]]
400400
! LLVMIR: %[[ld:.*]] = load <16 x i8>, ptr %[[addr]], align 1
@@ -481,7 +481,7 @@ subroutine vec_xl_be_testi8a(arg1, arg2, res)
481481
vector(integer(1)) :: res
482482
res = vec_xl_be(arg1, arg2)
483483

484-
484+
485485
! LLVMIR: %4 = load i8, ptr %0, align 1
486486
! LLVMIR: %5 = getelementptr i8, ptr %1, i8 %4
487487
! LLVMIR: %6 = load <16 x i8>, ptr %5, align 1

flang/test/Lower/PowerPC/ppc-vec-sel.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ subroutine vec_sel_testu8(arg1, arg2, arg3)
136136
vector(unsigned(8)) :: arg1, arg2, r
137137
vector(unsigned(8)) :: arg3
138138
r = vec_sel(arg1, arg2, arg3)
139-
139+
140140

141141
! LLVMIR: %[[arg1:.*]] = load <2 x i64>, ptr %{{.*}}, align 16
142142
! LLVMIR: %[[arg2:.*]] = load <2 x i64>, ptr %{{.*}}, align 16

flang/test/Lower/PowerPC/ppc-vec-store-elem-order.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ subroutine vec_st_test(arg1, arg2, arg3)
1414
! LLVMIR: %[[arg1:.*]] = load <8 x i16>, ptr %0, align 16
1515
! LLVMIR: %[[arg2:.*]] = load i32, ptr %1, align 4
1616
! LLVMIR: %[[addr:.*]] = getelementptr i8, ptr %2, i32 %[[arg2]]
17-
! LLVMIR: %[[bc:.*]] = bitcast <8 x i16> %[[arg1]] to <4 x i32>
17+
! LLVMIR: %[[bc:.*]] = bitcast <8 x i16> %[[arg1]] to <4 x i32>
1818
! LLVMIR: %[[shf:.*]] = shufflevector <4 x i32> %[[bc]], <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
1919
! LLVMIR: call void @llvm.ppc.altivec.stvx(<4 x i32> %[[shf]], ptr %[[addr]])
2020
end subroutine vec_st_test
@@ -28,7 +28,7 @@ subroutine vec_ste_test(arg1, arg2, arg3)
2828
integer(4) :: arg2
2929
real(4) :: arg3
3030
call vec_ste(arg1, arg2, arg3)
31-
31+
3232
! LLVMIR: %[[arg1:.*]] = load <4 x float>, ptr %0, align 16
3333
! LLVMIR: %[[arg2:.*]] = load i32, ptr %1, align 4
3434
! LLVMIR: %[[addr]] = getelementptr i8, ptr %2, i32 %[[arg2]]

flang/test/Lower/PowerPC/ppc-vec-store.f90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ subroutine vec_xst_test_vr4i2r4(arg1, arg2, arg3)
300300
real(4) :: arg3
301301
call vec_xst(arg1, arg2, arg3)
302302

303-
303+
304304
! LLVMIR: %[[arg1:.*]] = load <4 x float>, ptr %{{.*}}, align 16
305305
! LLVMIR: %[[arg2:.*]] = load i16, ptr %{{.*}}, align 2
306306
! LLVMIR: %[[addr:.*]] = getelementptr i8, ptr %{{.*}}, i16 %[[arg2]]
@@ -432,7 +432,7 @@ subroutine vec_xst_be_test_vi4i4vai4(arg1, arg2, arg3, i)
432432
! LLVMIR: %[[iadd:.*]] = add nsw i64 %[[imul2]], 0
433433
! LLVMIR: %[[gep1:.*]] = getelementptr <4 x i32>, ptr %2, i64 %[[iadd]]
434434
! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %0, align 16
435-
! LLVMIR: %[[arg2:.*]] = load i32, ptr %1, align 4
435+
! LLVMIR: %[[arg2:.*]] = load i32, ptr %1, align 4
436436
! LLVMIR: %[[gep2:.*]] = getelementptr i8, ptr %[[gep1]], i32 %[[arg2]]
437437
! LLVMIR: %[[src:.*]] = shufflevector <4 x i32> %[[arg1]], <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
438438
! LLVMIR: store <4 x i32> %[[src]], ptr %[[gep2]], align 16
@@ -449,7 +449,7 @@ subroutine vec_xstd2_test_vr4i2r4(arg1, arg2, arg3)
449449
real(4) :: arg3
450450
call vec_xstd2(arg1, arg2, arg3)
451451

452-
452+
453453
! LLVMIR: %[[arg1:.*]] = load <4 x float>, ptr %{{.*}}, align 16
454454
! LLVMIR: %[[arg2:.*]] = load i16, ptr %{{.*}}, align 2
455455
! LLVMIR: %[[addr:.*]] = getelementptr i8, ptr %{{.*}}, i16 %[[arg2]]
@@ -509,7 +509,7 @@ subroutine vec_xstd2_test_vi4i4vai4(arg1, arg2, arg3, i)
509509
! LLVMIR: %[[iadd:.*]] = add nsw i64 %[[imul2]], 0
510510
! LLVMIR: %[[gep1:.*]] = getelementptr <4 x i32>, ptr %2, i64 %[[iadd]]
511511
! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %0, align 16
512-
! LLVMIR: %[[arg2:.*]] = load i32, ptr %1, align 4
512+
! LLVMIR: %[[arg2:.*]] = load i32, ptr %1, align 4
513513
! LLVMIR: %[[gep2:.*]] = getelementptr i8, ptr %[[gep1]], i32 %[[arg2]]
514514
! LLVMIR: %[[src:.*]] = bitcast <4 x i32> %[[arg1]] to <2 x i64>
515515
! LLVMIR: store <2 x i64> %[[src]], ptr %[[gep2]], align 16
@@ -526,7 +526,7 @@ subroutine vec_xstw4_test_vr4i2r4(arg1, arg2, arg3)
526526
real(4) :: arg3
527527
call vec_xstw4(arg1, arg2, arg3)
528528

529-
529+
530530
! LLVMIR: %[[arg1:.*]] = load <4 x float>, ptr %{{.*}}, align 16
531531
! LLVMIR: %[[arg2:.*]] = load i16, ptr %{{.*}}, align 2
532532
! LLVMIR: %[[addr:.*]] = getelementptr i8, ptr %{{.*}}, i16 %[[arg2]]
@@ -584,7 +584,7 @@ subroutine vec_xstw4_test_vi4i4vai4(arg1, arg2, arg3, i)
584584
! LLVMIR: %[[iadd:.*]] = add nsw i64 %[[imul2]], 0
585585
! LLVMIR: %[[gep1:.*]] = getelementptr <4 x i32>, ptr %2, i64 %[[iadd]]
586586
! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %0, align 16
587-
! LLVMIR: %[[arg2:.*]] = load i32, ptr %1, align 4
587+
! LLVMIR: %[[arg2:.*]] = load i32, ptr %1, align 4
588588
! LLVMIR: %[[gep2:.*]] = getelementptr i8, ptr %[[gep1]], i32 %[[arg2]]
589589
! LLVMIR: store <4 x i32> %[[arg1]], ptr %[[gep2]], align 16
590590
end subroutine vec_xstw4_test_vi4i4vai4

flang/test/Lower/allocatable-assignment.f90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,14 @@ subroutine test_dyn_char(x, n, c)
283283
! CHECK: hlfir.assign %[[VAL_8]]#0 to %[[VAL_14]]#0 realloc keep_lhs_len : !fir.box<!fir.array<20x!fir.char<1,?>>>, !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.char<1,?>>>>>
284284

285285
subroutine test_derived_with_init(x, y)
286-
type t
286+
type t
287287
integer, allocatable :: a(:)
288-
end type
289-
type(t), allocatable :: x
290-
type(t) :: y
288+
end type
289+
type(t), allocatable :: x
290+
type(t) :: y
291291
! The allocatable component of `x` need to be initialized
292292
! during the automatic allocation (setting its rank and allocation
293-
! status) before it is assigned with the component of `y`
293+
! status) before it is assigned with the component of `y`
294294
x = y
295295
end subroutine
296296
! CHECK-LABEL: func.func @_QMalloc_assignPtest_derived_with_init(
@@ -357,7 +357,7 @@ end function elt
357357
! real :: y(2, 3) = reshape([1,2,3,4,5,6], [2,3])
358358
! real, allocatable :: x (:, :)
359359
! allocate(x(2,2))
360-
! call test_with_lbounds(x, y)
360+
! call test_with_lbounds(x, y)
361361
! print *, x(10, 20)
362362
! print *, x
363363
!end

flang/test/Lower/allocatable-globals.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
module mod_allocatables
1313
character(10), allocatable :: c(:)
1414
end module
15-
15+
1616
! CHECK-LABEL: func @_QPtest_mod_allocatables()
1717
subroutine test_mod_allocatables()
1818
use mod_allocatables, only: c

flang/test/Lower/allocatable-polymorphic.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ subroutine test_allocate_with_mold()
460460
! CHECK: %[[X_DECL:.*]]:2 = hlfir.declare %[[X]](%{{.*}}) {uniq_name = "_QMpolyFtest_allocate_with_moldEx"} : (!fir.ref<!fir.array<10x!fir.type<_QMpolyTp2{p1:!fir.type<_QMpolyTp1{a:i32,b:i32}>,c:i32}>>>, !fir.shape<1>) -> (!fir.ref<!fir.array<10x!fir.type<_QMpolyTp2{p1:!fir.type<_QMpolyTp1{a:i32,b:i32}>,c:i32}>>>, !fir.ref<!fir.array<10x!fir.type<_QMpolyTp2{p1:!fir.type<_QMpolyTp1{a:i32,b:i32}>,c:i32}>>>)
461461

462462
! CHECK: %[[EMBOX_X:.*]] = fir.embox %[[X_DECL]]#0(%{{.*}}) : (!fir.ref<!fir.array<10x!fir.type<_QMpolyTp2{p1:!fir.type<_QMpolyTp1{a:i32,b:i32}>,c:i32}>>>, !fir.shape<1>) -> !fir.box<!fir.array<10x!fir.type<_QMpolyTp2{p1:!fir.type<_QMpolyTp1{a:i32,b:i32}>,c:i32}>>>
463-
! CHECK: %[[RANK:.*]] = arith.constant 1 : i32
463+
! CHECK: %[[RANK:.*]] = arith.constant 1 : i32
464464
! CHECK: %[[P_BOX_NONE:.*]] = fir.convert %[[P_DECL]]#0 : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>) -> !fir.ref<!fir.box<none>>
465465
! CHECK: %[[X_BOX_NONE:.*]] = fir.convert %[[EMBOX_X]] : (!fir.box<!fir.array<10x!fir.type<_QMpolyTp2{p1:!fir.type<_QMpolyTp1{a:i32,b:i32}>,c:i32}>>>) -> !fir.box<none>
466466
! CHECK: fir.call @_FortranAPointerApplyMold(%[[P_BOX_NONE]], %[[X_BOX_NONE]], %[[RANK]]) {{.*}} : (!fir.ref<!fir.box<none>>, !fir.box<none>, i32) -> ()
@@ -614,10 +614,10 @@ program test_alloc
614614
! LLVM: %[[TYPE_CODE:.*]] = load i8, ptr %[[TYPE_CODE_GEP]]
615615
! LLVM-NEXT: %[[EXT_TYPE_CODE:.*]] = sext i8 %[[TYPE_CODE]] to i32
616616
! LLVM: %{{.*}} = insertvalue { ptr, i64, i32, i8, i8, i8, i8, ptr, [1 x i64] } undef, i64 %[[ELEM_SIZE]], 1
617-
! LLVM: %[[TRUNC_TYPE_CODE:.*]] = trunc i32 %[[EXT_TYPE_CODE]] to i8
617+
! LLVM: %[[TRUNC_TYPE_CODE:.*]] = trunc i32 %[[EXT_TYPE_CODE]] to i8
618618
! LLVM: %{{.*}} = insertvalue { ptr, i64, i32, i8, i8, i8, i8, ptr, [1 x i64] } %{{.*}}, i8 %[[TRUNC_TYPE_CODE]], 4
619619
! LLVM: store { ptr, i64, i32, i8, i8, i8, i8, ptr, [1 x i64] } %{{.*}}, ptr %[[TMP:.*]]
620-
! LLVM: call void %{{.*}}(ptr %{{.*}})
620+
! LLVM: call void %{{.*}}(ptr %{{.*}})
621621

622622
! LLVM: call void @llvm.memcpy.p0.p0.i32
623623
! LLVM: %[[GEP_TDESC_C2:.*]] = getelementptr { ptr, i64, i32, i8, i8, i8, i8, ptr, [1 x i64] }, ptr %{{.*}}, i32 0, i32 7
@@ -628,7 +628,7 @@ program test_alloc
628628
! LLVM: %[[TYPE_CODE:.*]] = load i8, ptr %[[TYPE_CODE_GEP]]
629629
! LLVM-NEXT: %[[EXT_TYPE_CODE:.*]] = sext i8 %[[TYPE_CODE]] to i32
630630
! LLVM: %{{.*}} = insertvalue { ptr, i64, i32, i8, i8, i8, i8, ptr, [1 x i64] } undef, i64 %[[ELEM_SIZE]], 1
631-
! LLVM: %[[TRUNC_TYPE_CODE:.*]] = trunc i32 %[[EXT_TYPE_CODE]] to i8
631+
! LLVM: %[[TRUNC_TYPE_CODE:.*]] = trunc i32 %[[EXT_TYPE_CODE]] to i8
632632
! LLVM: %{{.*}} = insertvalue { ptr, i64, i32, i8, i8, i8, i8, ptr, [1 x i64] } %{{.*}}, i8 %[[TRUNC_TYPE_CODE]], 4
633633
! LLVM: store { ptr, i64, i32, i8, i8, i8, i8, ptr, [1 x i64] } %{{.*}}, ptr %{{.*}}
634634
! LLVM: call void %{{.*}}(ptr %{{.*}})

flang/test/Lower/allocated.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ subroutine allocated_test(scalar, array)
1515
! CHECK: cmpi ne, %[[addrToInt1]], %c0{{.*}}
1616
print *, allocated(array)
1717
end subroutine
18-

flang/test/Lower/array-elemental-calls-2.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ subroutine check_parentheses_logical()
172172
subroutine check_parentheses_derived(a)
173173
type t
174174
integer :: i
175-
end type
175+
end type
176176
interface
177177
integer elemental function elem_func_derived(x)
178178
import :: t

flang/test/Lower/array-elemental-calls.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ elemental impure integer function impure_func(j)
5757
integer, intent(in) :: j
5858
end function
5959
end interface
60-
60+
6161
i = 42 + pure_func(j)
6262
i = 42 + impure_func(j)
6363
end subroutine

0 commit comments

Comments
 (0)