Skip to content

[flang][test] Fix filecheck annotation typos #92387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 5, 2025
Merged

Conversation

klensy
Copy link
Contributor

@klensy klensy commented May 16, 2024

Moved fixes for flang from #91854, plus few additional in second commit.

@llvmbot
Copy link
Member

llvmbot commented May 16, 2024

@llvm/pr-subscribers-flang-semantics
@llvm/pr-subscribers-flang-openmp
@llvm/pr-subscribers-openacc

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

Author: klensy (klensy)

Changes

Moved fixes for flang from #91854, plus few additional in second commit.


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

30 Files Affected:

  • (modified) flang/test/Driver/dump-pft.f90 (+3-3)
  • (modified) flang/test/Driver/omp-driver-offload.f90 (+1-1)
  • (modified) flang/test/Evaluate/errors01.f90 (+2-2)
  • (modified) flang/test/Fir/arrexp.fir (+6-6)
  • (modified) flang/test/Fir/pdt.fir (+12-12)
  • (modified) flang/test/Fir/target.fir (+4-4)
  • (modified) flang/test/Lower/CUDA/cuda-allocatable.cuf (+1-1)
  • (modified) flang/test/Lower/HLFIR/calls-f77.f90 (+2-2)
  • (modified) flang/test/Lower/HLFIR/maxloc.f90 (+1-1)
  • (modified) flang/test/Lower/HLFIR/maxval.f90 (+1-1)
  • (modified) flang/test/Lower/HLFIR/minloc.f90 (+1-1)
  • (modified) flang/test/Lower/HLFIR/minval.f90 (+1-1)
  • (modified) flang/test/Lower/HLFIR/sum.f90 (+1-1)
  • (modified) flang/test/Lower/Intrinsics/adjustl.f90 (+1-1)
  • (modified) flang/test/Lower/Intrinsics/adjustr.f90 (+1-1)
  • (modified) flang/test/Lower/Intrinsics/any.f90 (+1-1)
  • (modified) flang/test/Lower/Intrinsics/fraction.f90 (+1-1)
  • (modified) flang/test/Lower/Intrinsics/parity.f90 (+1-1)
  • (modified) flang/test/Lower/Intrinsics/storage_size-2.f90 (+1-1)
  • (modified) flang/test/Lower/OpenACC/acc-set.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/wsloop-reduction-array.f90 (+3-3)
  • (modified) flang/test/Lower/OpenMP/wsloop-reduction-array2.f90 (+1-1)
  • (modified) flang/test/Lower/array.f90 (+3-3)
  • (modified) flang/test/Lower/control-flow.f90 (+1-1)
  • (modified) flang/test/Lower/derived-assignments.f90 (+9-9)
  • (modified) flang/test/Lower/forall/array-subscripts.f90 (+1-1)
  • (modified) flang/test/Lower/pause-statement.f90 (+1-1)
  • (modified) flang/test/Lower/polymorphic.f90 (+1-1)
  • (modified) flang/test/Parser/OpenMP/in-reduction-clause.f90 (+1-1)
  • (modified) flang/test/Transforms/simplifyintrinsics.fir (+2-2)
diff --git a/flang/test/Driver/dump-pft.f90 b/flang/test/Driver/dump-pft.f90
index 6d98fc9f10b89..5e940c769449f 100644
--- a/flang/test/Driver/dump-pft.f90
+++ b/flang/test/Driver/dump-pft.f90
@@ -4,8 +4,8 @@
 
 ! PFT: 1 Subroutine test_routine: subroutine test_routine(a, b, n)
 ! PFT-NEXT:  1 EndSubroutineStmt: end subroutine
-! PRF-NEXT: End Subroutine test_routine
-! PFT-NO: Program -> ProgramUnit -> SubroutineSubprogram
+! PFT-NEXT: End Subroutine test_routine
+! PFT-NOT: Program -> ProgramUnit -> SubroutineSubprogram
 
 ! PARSE_TREE: Program -> ProgramUnit -> SubroutineSubprogram
 ! PARSE_TREE-NEXT: | SubroutineStmt
@@ -17,7 +17,7 @@
 ! PARSE_TREE-NEXT: | | ImplicitPart ->
 ! PARSE_TREE-NEXT: | ExecutionPart -> Block
 ! PARSE_TREE-NEXT: | EndSubroutineStmt ->
-! PARSE_TREE-NO: Subroutine test_routine: subroutine test_routine(a, b, n)
+! PARSE_TREE-NOT: Subroutine test_routine: subroutine test_routine(a, b, n)
 
 subroutine test_routine(a, b, n)
 end subroutine
diff --git a/flang/test/Driver/omp-driver-offload.f90 b/flang/test/Driver/omp-driver-offload.f90
index 8f48ca75114ce..4794bc35a38d0 100644
--- a/flang/test/Driver/omp-driver-offload.f90
+++ b/flang/test/Driver/omp-driver-offload.f90
@@ -137,7 +137,7 @@
 ! RUN: -fopenmp-targets=nvptx64-nvidia-cuda \
 ! RUN: -fopenmp-target-debug \
 ! RUN: | FileCheck %s --check-prefixes=CHECK-TARGET-DEBUG
-! CHECK-TARGET-DEBUG-EQ: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" "-fopenmp-target-debug=111" {{.*}}.f90"
+! CHECK-TARGET-DEBUG: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" "-fopenmp-target-debug=111" {{.*}}.f90"
 
 ! RUN: %flang -S -### %s -o %t 2>&1 \
 ! RUN: -fopenmp --offload-arch=gfx90a \
diff --git a/flang/test/Evaluate/errors01.f90 b/flang/test/Evaluate/errors01.f90
index bad73f2e8b160..863e2231007f3 100644
--- a/flang/test/Evaluate/errors01.f90
+++ b/flang/test/Evaluate/errors01.f90
@@ -145,9 +145,9 @@ subroutine s11
   subroutine s12(x,y)
     class(t), intent(in) :: x
     class(*), intent(in) :: y
-    !CHERK: error: Must be a constant value
+    !CHECK: error: Must be a constant value
     integer, parameter :: bad1 = storage_size(x)
-    !CHERK: error: Must be a constant value
+    !CHECK: error: Must be a constant value
     integer, parameter :: bad2 = storage_size(y)
   end subroutine
   subroutine s13
diff --git a/flang/test/Fir/arrexp.fir b/flang/test/Fir/arrexp.fir
index 5d265a5e3a08d..ad63516028bbb 100644
--- a/flang/test/Fir/arrexp.fir
+++ b/flang/test/Fir/arrexp.fir
@@ -1,6 +1,6 @@
 // RUN: tco %s | FileCheck %s
 
-// CHECK-LINE: define void @f1
+// CHECK-LABEL: define void @f1
 // CHECK: (ptr %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
 func.func @f1(%a : !fir.ref<!fir.array<?x?xf32>>, %n : index, %m : index, %o : index, %p : index, %f : f32) {
   %c1 = arith.constant 1 : index
@@ -22,7 +22,7 @@ func.func @f1(%a : !fir.ref<!fir.array<?x?xf32>>, %n : index, %m : index, %o : i
   return
 }
 
-// CHECK-LINE: define void @f2
+// CHECK-LABEL: define void @f2
 // CHECK: (ptr %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
 func.func @f2(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf32>>, %n : index, %m : index, %o : index, %p : index, %f : f32) {
   %c1 = arith.constant 1 : index
@@ -46,7 +46,7 @@ func.func @f2(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf
   return
 }
 
-// CHECK-LINE: define void @f3
+// CHECK-LABEL: define void @f3
 // CHECK: (ptr %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
 func.func @f3(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf32>>, %n : index, %m : index, %o : index, %p : index, %f : f32) {
   %c1 = arith.constant 1 : index
@@ -71,7 +71,7 @@ func.func @f3(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf
   return
 }
 
-// CHECK-LINE: define void @f4
+// CHECK-LABEL: define void @f4
 // CHECK: (ptr %[[A:[^,]*]], {{.*}}, float %[[F:.*]])
 func.func @f4(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf32>>, %n : index, %m : index, %o : index, %p : index, %f : f32) {
   %c1 = arith.constant 1 : index
@@ -101,7 +101,7 @@ func.func @f4(%a : !fir.ref<!fir.array<?x?xf32>>, %b : !fir.ref<!fir.array<?x?xf
 // Array expression assignment with potentially non contiguous arrays (e.g.
 // `a = b + f`, with and v assumed shapes.
 // Tests that the stride from the descriptor is used.
-// CHECK-LINE: define void @f5
+// CHECK-LABEL: define void @f5
 // CHECK: (ptr %[[A:.*]], ptr %[[B:.*]], float %[[F:.*]])
 func.func @f5(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: !fir.box<!fir.array<?xf32>>, %arg2: f32) {
   %c0 = arith.constant 0 : index
@@ -134,7 +134,7 @@ func.func @f5(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: !fir.box<!fir.array<?xf
 // Overlapping array expression assignment with a potentially non
 // contiguous array (e.g. `a(2:10:1) = a(1:9:1) + f`, with a assumed shape).
 // Test that a temp is created.
-// CHECK-LINE: define void @f6
+// CHECK-LABEL: define void @f6
 // CHECK: (ptr %[[A:[^,]*]], float %[[F:.*]])
 func.func @f6(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: f32) {
   %c0 = arith.constant 0 : index
diff --git a/flang/test/Fir/pdt.fir b/flang/test/Fir/pdt.fir
index 4464b897414a1..53ff90af32d9a 100644
--- a/flang/test/Fir/pdt.fir
+++ b/flang/test/Fir/pdt.fir
@@ -1,6 +1,6 @@
 // RUN: tco %s | FileCheck %s
 
-// CHECK-LINE: define i64 @_QTtP.mem.size(i32 %0, i16 %1)
+// CHECK-LABEL: define i64 @_QTtP.mem.size(i32 %0, i16 %1)
 func.func @_QTtP.mem.size(%0 : i32, %1 : i16) -> index {
   %2 = call @_QTtP.f1.size(%0, %1) : (i32, i16) -> index
   %3 = call @_QTtP.f2.size(%0, %1) : (i32, i16) -> index
@@ -8,25 +8,25 @@ func.func @_QTtP.mem.size(%0 : i32, %1 : i16) -> index {
   // CHECK: ret i64 8
   return %4 : index
 }
-// CHECK-LINE: define i64 @_QTtP.f1.size(i32 %0, i16 %1)
+// CHECK-LABEL: define i64 @_QTtP.f1.size(i32 %0, i16 %1)
 func.func @_QTtP.f1.size(%0 : i32, %1 : i16) -> index {
   %2 = arith.constant 4 : index
   // CHECK: ret i64 4
   return %2 : index
 }
-// CHECK-LINE: define i64 @_QTtP.f2.size(i32 %0, i16 %1)
+// CHECK-LABEL: define i64 @_QTtP.f2.size(i32 %0, i16 %1)
 func.func @_QTtP.f2.size(%0 : i32, %1 : i16) -> index {
   %2 = arith.constant 4 : index
   // CHECK: ret i64 4
   return %2 : index
 }
-// CHECK-LINE: define i32 @_QTtP.f1.offset(i32 %0, i16 %1)
+// CHECK-LABEL: define i32 @_QTtP.f1.offset(i32 %0, i16 %1)
 func.func @_QTtP.f1.offset(%0 : i32, %1 : i16) -> i32 {
   %2 = arith.constant 0 : i32
   // CHECK: ret i32 0
   return %2 : i32
 }
-// CHECK-LINE: define i32 @_QTtP.f2.offset(i32 %0, i16 %1)
+// CHECK-LABEL: define i32 @_QTtP.f2.offset(i32 %0, i16 %1)
 func.func @_QTtP.f2.offset(%0 : i32, %1 : i16) -> i32 {
   %2 = arith.constant 4 : i32
   // CHECK: ret i32 4
@@ -44,7 +44,7 @@ func.func @_QTtP.f2.offset(%0 : i32, %1 : i16) -> i32 {
 //   var%f1 = 4
 // end program p
 
-// CHECK-LINE: define void @_QQmain(i32 %0, i16 %1)
+// CHECK-LABEL: define void @_QQmain(i32 %0, i16 %1)
 func.func @_QQmain(%arg0 : i32, %arg1 : i16) {
   // CHECK: %[[size:.*]] = call i64 @_QTtP.mem.size(i32 %0, i16 %1)
   // CHECK: %[[alloc:.*]] = alloca i8, i64 %[[size]]
@@ -56,7 +56,7 @@ func.func @_QQmain(%arg0 : i32, %arg1 : i16) {
   return
 }
 
-// CHECK-LINE: define i64 @_QTt1P.mem.size(i32 %0, i32 %1)
+// CHECK-LABEL: define i64 @_QTt1P.mem.size(i32 %0, i32 %1)
 func.func @_QTt1P.mem.size(%0 : i32, %1 : i32) -> index {
   // CHECK: call i64 @_QTt1P.f1.size
   %2 = call @_QTt1P.f1.size(%0, %1) : (i32, i32) -> index
@@ -65,22 +65,22 @@ func.func @_QTt1P.mem.size(%0 : i32, %1 : i32) -> index {
   %4 = arith.addi %2, %3 : index
   return %4 : index
 }
-// CHECK-LINE: define i64 @_QTt1P.f1.size(i32 %0, i32 %1)
+// CHECK-LABEL: define i64 @_QTt1P.f1.size(i32 %0, i32 %1)
 func.func @_QTt1P.f1.size(%0 : i32, %1 : i32) -> index {
   %2 = fir.convert %0 : (i32) -> index
   return %2 : index
 }
-// CHECK-LINE: define i64 @_QTt1P.f2.size(i32 %0, i32 %1)
+// CHECK-LABEL: define i64 @_QTt1P.f2.size(i32 %0, i32 %1)
 func.func @_QTt1P.f2.size(%0 : i32, %1 : i32) -> index {
   %2 = fir.convert %1 : (i32) -> index
   return %2 : index
 }
-// CHECK-LINE: define i32 @_QTt1P.f1.offset(i32 %0, i32 %1)
+// CHECK-LABEL: define i32 @_QTt1P.f1.offset(i32 %0, i32 %1)
 func.func @_QTt1P.f1.offset(%0 : i32, %1 : i32) -> i32 {
   %2 = arith.constant 0 : i32
   return %2 : i32
 }
-// CHECK-LINE: define i32 @_QTt1P.f2.offset(i32 %0, i32 %1)
+// CHECK-LABEL: define i32 @_QTt1P.f2.offset(i32 %0, i32 %1)
 func.func @_QTt1P.f2.offset(%0 : i32, %1 : i32) -> i32 {
   return %0 : i32
 }
@@ -97,7 +97,7 @@ func.func @_QTt1P.f2.offset(%0 : i32, %1 : i32) -> i32 {
 
 func.func private @bar(!fir.ref<!fir.char<1,?>>)
 
-// CHECK-LINE: define i8* @_QPfoo(i32 %0, i32 %1)
+// CHECK-LABEL: define i8* @_QPfoo(i32 %0, i32 %1)
 func.func @_QPfoo(%arg0 : i32, %arg1 : i32) {
   // CHECK: %[[size:.*]] = call i64 @_QTt1P.mem.size(i32 %0, i32 %1)
   // CHECK: %[[alloc:.*]] = alloca i8, i64 %[[size]]
diff --git a/flang/test/Fir/target.fir b/flang/test/Fir/target.fir
index 653b100bccbd4..fc81108aa3915 100644
--- a/flang/test/Fir/target.fir
+++ b/flang/test/Fir/target.fir
@@ -40,9 +40,9 @@ func.func @gen8() -> !fir.complex<8> {
   %c1 = arith.constant 1 : i32
   %5 = fir.insert_value %4, %2, [1 : index] : (!fir.complex<8>, f64) -> !fir.complex<8>
   // I32: store { double, double } { double -4.000000e+00, double 1.000000e+00 }
-  // I64: store { double, double } { double -4.000000e+00, double 1.000000e+00 }
-  // I64: %[[load:.*]] = load { double, double }
-  // I64: ret { double, double } %[[load]]
+  // X64: store { double, double } { double -4.000000e+00, double 1.000000e+00 }
+  // X64: %[[load:.*]] = load { double, double }
+  // X64: ret { double, double } %[[load]]
   // AARCH64: ret { double, double }
   // PPC: ret { double, double }
   return %5 : !fir.complex<8>
@@ -113,7 +113,7 @@ func.func @char1lensum(%arg0 : !fir.boxchar<1>, %arg1 : !fir.boxchar<1>) -> i64
 }
 
 // I32-LABEL: define void @char1copy(ptr sret(i8) %0, i32 %1, ptr %2, i32 %3)
-// I64-LABEL: define void @char1copy(ptr sret(i8) %0, i64 %1, ptr %2, i64 %3)
+// X64-LABEL: define void @char1copy(ptr sret(i8) %0, i64 %1, ptr %2, i64 %3)
 // PPC-LABEL: define void @char1copy(ptr sret(i8) %0, i64 %1, ptr %2, i64 %3)
 func.func @char1copy(%arg0 : !fir.boxchar<1> {llvm.sret = !fir.char<1, ?>}, %arg1 : !fir.boxchar<1>) {
   // I32-DAG: %[[p0:.*]] = insertvalue { ptr, i32 } undef, ptr %2, 0
diff --git a/flang/test/Lower/CUDA/cuda-allocatable.cuf b/flang/test/Lower/CUDA/cuda-allocatable.cuf
index eff5f13669e90..007d619043eaf 100644
--- a/flang/test/Lower/CUDA/cuda-allocatable.cuf
+++ b/flang/test/Lower/CUDA/cuda-allocatable.cuf
@@ -61,7 +61,7 @@ end subroutine
 ! CHECK: %[[BOX_DECL:.*]]:2 = hlfir.declare %[[BOX]] {cuda_attr = #fir.cuda<pinned>, fortran_attrs = #fir.var_attrs<allocatable>, uniq_name = "_QFsub3Ea"} : (!fir.ref<!fir.box<!fir.heap<!fir.array<?x?xi32>>>>) -> (!fir.ref<!fir.box<!fir.heap<!fir.array<?x?xi32>>>>, !fir.ref<!fir.box<!fir.heap<!fir.array<?x?xi32>>>>)
 ! CHECK: %[[PLOG:.*]] = fir.alloca !fir.logical<4> {bindc_name = "plog", uniq_name = "_QFsub3Eplog"}
 ! CHECK: %[[PLOG_DECL:.*]]:2 = hlfir.declare %5 {uniq_name = "_QFsub3Eplog"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
-! CHECK-2: fir.call @_FortranAAllocatableSetBounds
+! CHECK: fir.call @_FortranAAllocatableSetBounds
 ! CHECK: %{{.*}} = fir.cuda_allocate %[[BOX_DECL]]#1 : !fir.ref<!fir.box<!fir.heap<!fir.array<?x?xi32>>>> pinned(%[[PLOG_DECL]]#1 : !fir.ref<!fir.logical<4>>) {cuda_attr = #fir.cuda<pinned>} -> i32
 ! CHECK: fir.if %{{.*}} {
 ! CHECK:   %{{.*}} = fir.cuda_deallocate %[[BOX_DECL]]#1 : !fir.ref<!fir.box<!fir.heap<!fir.array<?x?xi32>>>> {cuda_attr = #fir.cuda<pinned>} -> i32
diff --git a/flang/test/Lower/HLFIR/calls-f77.f90 b/flang/test/Lower/HLFIR/calls-f77.f90
index a970deb056f5a..3fa7b7eb715f4 100644
--- a/flang/test/Lower/HLFIR/calls-f77.f90
+++ b/flang/test/Lower/HLFIR/calls-f77.f90
@@ -191,11 +191,11 @@ subroutine alternate_return_call(n1, n2, k)
 !     Test calls to user procedures with intrinsic interfaces
 ! -----------------------------------------------------------------------------
 
-! CHECK-NAME: func.func @_QPintrinsic_iface()
+! CHECK-LABEL: func.func @_QPintrinsic_iface()
 subroutine intrinsic_iface()
   intrinsic acos
   real :: x
   procedure(acos) :: proc
   x = proc(1.0)
 end subroutine
-! CHECK" fir.call @_QPproc(%{{.*}}) {{.*}}: (!fir.ref<f32>) -> f32
+! CHECK: fir.call @_QPproc(%{{.*}}) {{.*}}: (!fir.ref<f32>) -> f32
diff --git a/flang/test/Lower/HLFIR/maxloc.f90 b/flang/test/Lower/HLFIR/maxloc.f90
index 166a1b9db1724..dbcac8ccb1d28 100644
--- a/flang/test/Lower/HLFIR/maxloc.f90
+++ b/flang/test/Lower/HLFIR/maxloc.f90
@@ -86,7 +86,7 @@ subroutine maxloc5(s)
 ! CHECK-NEXT:    hlfir.assign %[[EXPR]] to %[[OUT]]#0 : !hlfir.expr<2xi32>, !fir.ref<!fir.array<2xi32>>
 ! CHECK-NEXT:    hlfir.destroy %[[EXPR]] : !hlfir.expr<2xi32>
 ! CHECK-NEXT:    return
-! CHECK-nEXT:  }
+! CHECK-NEXT:  }
 
 ! back argument as .true.
 subroutine maxloc_back(a, s)
diff --git a/flang/test/Lower/HLFIR/maxval.f90 b/flang/test/Lower/HLFIR/maxval.f90
index 5adad286a77d2..7a4f52fc1c0d4 100644
--- a/flang/test/Lower/HLFIR/maxval.f90
+++ b/flang/test/Lower/HLFIR/maxval.f90
@@ -83,7 +83,7 @@ subroutine maxval5(s)
 ! CHECK-NEXT:    hlfir.assign %[[EXPR]] to %[[OUT]]#0 : !hlfir.expr<2xi32>, !fir.ref<!fir.array<2xi32>>
 ! CHECK-NEXT:    hlfir.destroy %[[EXPR]] : !hlfir.expr<2xi32>
 ! CHECK-NEXT:    return
-! CHECK-nEXT:  }
+! CHECK-NEXT:  }
 
 subroutine maxval6(a, s, d)
   integer, pointer :: d
diff --git a/flang/test/Lower/HLFIR/minloc.f90 b/flang/test/Lower/HLFIR/minloc.f90
index f835cf54b2a73..45f2ef2d7f3b7 100644
--- a/flang/test/Lower/HLFIR/minloc.f90
+++ b/flang/test/Lower/HLFIR/minloc.f90
@@ -86,7 +86,7 @@ subroutine minloc5(s)
 ! CHECK-NEXT:    hlfir.assign %[[EXPR]] to %[[OUT]]#0 : !hlfir.expr<2xi32>, !fir.ref<!fir.array<2xi32>>
 ! CHECK-NEXT:    hlfir.destroy %[[EXPR]] : !hlfir.expr<2xi32>
 ! CHECK-NEXT:    return
-! CHECK-nEXT:  }
+! CHECK-NEXT:  }
 
 ! back argument as .true.
 subroutine minloc_back(a, s)
diff --git a/flang/test/Lower/HLFIR/minval.f90 b/flang/test/Lower/HLFIR/minval.f90
index 01b0ce77e2d30..3382bd20b6652 100644
--- a/flang/test/Lower/HLFIR/minval.f90
+++ b/flang/test/Lower/HLFIR/minval.f90
@@ -83,7 +83,7 @@ subroutine minval5(s)
 ! CHECK-NEXT:    hlfir.assign %[[EXPR]] to %[[OUT]]#0 : !hlfir.expr<2xi32>, !fir.ref<!fir.array<2xi32>>
 ! CHECK-NEXT:    hlfir.destroy %[[EXPR]] : !hlfir.expr<2xi32>
 ! CHECK-NEXT:    return
-! CHECK-nEXT:  }
+! CHECK-NEXT:  }
 
 subroutine minval6(a, s, d)
   integer, pointer :: d
diff --git a/flang/test/Lower/HLFIR/sum.f90 b/flang/test/Lower/HLFIR/sum.f90
index 339582088b032..aed567f73b6b1 100644
--- a/flang/test/Lower/HLFIR/sum.f90
+++ b/flang/test/Lower/HLFIR/sum.f90
@@ -83,7 +83,7 @@ subroutine sum5(s)
 ! CHECK-NEXT:    hlfir.assign %[[EXPR]] to %[[OUT]]#0 : !hlfir.expr<2xi32>, !fir.ref<!fir.array<2xi32>>
 ! CHECK-NEXT:    hlfir.destroy %[[EXPR]] : !hlfir.expr<2xi32>
 ! CHECK-NEXT:    return
-! CHECK-nEXT:  }
+! CHECK-NEXT:  }
 
 subroutine sum6(a, s, d)
   integer, pointer :: d
diff --git a/flang/test/Lower/Intrinsics/adjustl.f90 b/flang/test/Lower/Intrinsics/adjustl.f90
index a8d004cd52665..4f5161b467298 100644
--- a/flang/test/Lower/Intrinsics/adjustl.f90
+++ b/flang/test/Lower/Intrinsics/adjustl.f90
@@ -1,6 +1,6 @@
 ! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
 
-! CHECK-LABLE: adjustl_test
+! CHECK-LABEL: adjustl_test
 subroutine adjustl_test
     character(len=12) :: adjust_str = '  0123456789'
   ! CHECK: %[[strBox:.*]] = fir.alloca !fir.box<!fir.heap<!fir.char<1,?>>>
diff --git a/flang/test/Lower/Intrinsics/adjustr.f90 b/flang/test/Lower/Intrinsics/adjustr.f90
index 07aa08c994586..92ebf313b6848 100644
--- a/flang/test/Lower/Intrinsics/adjustr.f90
+++ b/flang/test/Lower/Intrinsics/adjustr.f90
@@ -1,6 +1,6 @@
 ! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
 
-! CHECK-LABLE: adjustr_test
+! CHECK-LABEL: adjustr_test
 subroutine adjustr_test
     character(len=12) :: adjust_str = '0123456789  '
   ! CHECK: %[[strBox:.*]] = fir.alloca !fir.box<!fir.heap<!fir.char<1,?>>>
diff --git a/flang/test/Lower/Intrinsics/any.f90 b/flang/test/Lower/Intrinsics/any.f90
index 1ea22d9706744..896001b2e031a 100644
--- a/flang/test/Lower/Intrinsics/any.f90
+++ b/flang/test/Lower/Intrinsics/any.f90
@@ -27,5 +27,5 @@ subroutine any_test2(mask, d, rslt)
 ! CHECK:  %[[r1:.*]] = fir.call @_FortranAAnyDim(%[[a6:.*]], %[[a7:.*]], %[[a1:.*]], %{{.*}}, %{{.*}}) {{.*}}: (!fir.ref<!fir.box<none>>, !fir.box<none>, i32, !fir.ref<i8>, i32) -> none
 ! CHECK-DAG:  %[[a10:.*]] = fir.load %[[a0:.*]] : !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.logical<4>>>>>
 ! CHECK-DAG:  %[[a12:.*]] = fir.box_addr %[[a10:.*]] : (!fir.box<!fir.heap<!fir.array<?x!fir.logical<4>>>>) -> !fir.heap<!fir.array<?x!fir.logical<4>>>
-! CHECK-DAG  fir.freemem %[[a12:.*]]
+! CHECK-DAG:  fir.freemem %[[a12:.*]]
 end subroutine
diff --git a/flang/test/Lower/Intrinsics/fraction.f90 b/flang/test/Lower/Intrinsics/fraction.f90
index f9fff725eb27a..3120e6f232ecb 100644
--- a/flang/test/Lower/Intrinsics/fraction.f90
+++ b/flang/test/Lower/Intrinsics/fraction.f90
@@ -1,7 +1,7 @@
 ! RUN: bbc -emit-fir %s -o - | FileCheck %s
  
 ! FRACTION
-! CHECK-LABE: fraction_test
+! CHECK-LABEL: fraction_test
 subroutine fraction_test
 
     real(kind=4) :: x1 = 178.1387e-4
diff --git a/flang/test/Lower/Intrinsics/parity.f90 b/flang/test/Lower/Intrinsics/parity.f90
index 6771b7d703275..32a2ea2e51d31 100644
--- a/flang/test/Lower/Intrinsics/parity.f90
+++ b/flang/test/Lower/Intrinsics/parity.f90
@@ -28,5 +28,5 @@ subroutine parity_test2(mask, d, rslt)
   ! CHECK:  %[[r1:.*]] = fir.call @_FortranAParityDim(%[[a6:.*]], %[[a7:.*]], %[[a1:.*]], %{{.*}}, %{{.*}}) {{.*}}: (!fir.ref<!fir.box<none>>, !fir.box<none>, i32, !fir.ref<i8>, i32) -> none
   ! CHECK-DAG:  %[[a10:.*]] = fir.load %[[a0:.*]] : !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.logical<4>>>>>
   ! CHECK-DAG:  %[[a12:.*]] = fir.box_addr %[[a10:.*]] : (!fir.box<!fir.heap<!fir.array<?x!fir.logical<4>>>>) -> !fir.heap<!fir.array<?x!fir.logical<4>>>
-  ! CHECK-DAG  fir.freemem %[[a12:.*]]
+  ! CHECK-DAG:  fir.freemem %[[a12:.*]]
 end subroutine parity_test2
diff --git a/flang/test/Lower/Intrinsics/storage_size-2.f90 b/flang/test/Lower/Intrinsics/storage_size-2.f90
index d6fb68df70ea9..208070e04e6e6 100644
--- a/flang/test/Lower/Intrinsics/storage_size-2.f90
+++ b/flang/test/Lower/Intrinsics/storage_size-2.f90
@@ -1,7 +1,7 @@
 ! Test storage_size with characters
 ! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
 
-! check-label: func.func @_QPtest_storage_size
+! CHECK-LABEL: func.func @_QPtest_storage_size
 subroutine test_storage_size(n)
   interface
     function return_char(l)
diff --git a/flang/test/Lower/OpenACC/acc-set.f90 b/flang/test/Lower/OpenACC/acc-set.f90
index 31c1912a87f57..91d2558ba4ba4 100644
--- a/flang/test/Lower/OpenACC/acc-set.f90
+++ b/flang/test/Lower/OpenACC/acc-set.f90
@@ -25,7 +25,7 @@ program test_acc_set
 ! CHECK: acc.set default_async(%[[C1]] : i32)
 
 ! CHECK: %[[C1:.*]] = arith.constant 1 : i32
-! FIR: %[[LOAD_L:.*]] = fir.load %[[L]] : !fir.ref<!fir.logical<4>>
+! HLFIR: %[[LOAD_L:.*]] = fir.load %[[L]] : !fir.ref<!fir.logical<4>>
 ! HLFIR: %[[LOAD_L:.*]] = fir.load %[[DECLL]]#0 : !fir.ref<!fir.logical<4>>
 ! CHECK: %[[CONV_L:.*]] = fir.convert %[[LOAD_L]] : (!fir.logical<4>) -> i1
 ! CHECK: acc.set default_async(%[[C1]] : i32) if(%[[CONV_L]])
diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-array.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-array.f90
index 7aecf870cf800..5f65d24531867 100644
--- a/flang/test/Lower/OpenMP/wsloop-reduction-array.f90
+++ b/flang/test/Lower/OpenMP/wsloop-reduction-array.f90
@@ -14,7 +14,7 @@ program reduce
 print *,r
 end program
 
-! CHECK-LABEL   omp.declare_reduction @add_reduction_byref_box_2xi32 : !fir.ref<!fir.box<!fir.array<2xi32>>> init {
+! CHECK-LABEL:   omp.declare_reduction @add_reduction_byref_box_2xi32 : !fir.ref<!fir.box<!fir.array<2xi32>>> init {
 ! CHECK:         ^bb0(%[[VAL_0:.*]]: !fir.ref<!fir.box<!fir.array<2xi32>>>):
 ! CHECK:           %[[VAL_2:.*]] = arith.constant 0 : i32
 ! CHECK:           %[[VAL_3:.*]] = fir.load %[[VAL_0]] : !fir.ref<!fir.box<!fir.array<2xi32>>>
@@ -32,7 +32,7 @@ program reduce
 ! CHECK:           fir.store %[[VAL_7]] to %[[VAL_8]] : !fir.ref<!fir....
[truncated]

Copy link

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Discourse for more information.

@banach-space banach-space requested a review from tblah May 16, 2024 12:56
@banach-space banach-space changed the title [flang,test] fix few filecheck annotation typos [flang][test] Fix filecheck annotation typos May 16, 2024
Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup. Currently 5 of the flang tests fail. I've suggested solutions where I can.

You can test with ninja check-flang or ping me and I will test it for you.

@tblah tblah requested review from clementval and skatrak May 16, 2024 13:48
@klensy klensy force-pushed the filecheck-flang branch from a1b7c9a to fa0b803 Compare May 19, 2024 09:28
@klensy
Copy link
Contributor Author

klensy commented May 19, 2024

Also few issues where i don't know how to fix:
flang\test\Lower\OpenMP\function-filtering-2.f90: 'LLVM-DEVICE-NOT', 'LLVM-HOST', 'LLVM-HOST-NOT' unknown prefixes
flang\test\Driver\fopenmp.f90 unknown CHECK-LD-ANY, CHECK-LD-ANYMD prefixes
flang\test\Lower\PowerPC\ppc-vec-load.f90 LLVMIR_P9 unknown prefix
flang\test\Lower\PowerPC\ppc-vec-shift-be-le.f90, unknown prefix LLVMIR

@kkwli
Copy link
Collaborator

kkwli commented May 20, 2024

flang\test\Lower\PowerPC\ppc-vec-load.f90 LLVMIR_P9 unknown prefix
flang\test\Lower\PowerPC\ppc-vec-shift-be-le.f90, unknown prefix LLVMIR

I will take a look of these two. Thanks.

@tblah
Copy link
Contributor

tblah commented May 20, 2024

Also few issues where i don't know how to fix: flang\test\Lower\OpenMP\function-filtering-2.f90: 'LLVM-DEVICE-NOT', 'LLVM-HOST', 'LLVM-HOST-NOT' unknown prefixes flang\test\Driver\fopenmp.f90 unknown CHECK-LD-ANY, CHECK-LD-ANYMD prefixes

I don't mind taking a look at these two. How do I reproduce them?

@klensy
Copy link
Contributor Author

klensy commented May 20, 2024

Also few issues where i don't know how to fix: flang\test\Lower\OpenMP\function-filtering-2.f90: 'LLVM-DEVICE-NOT', 'LLVM-HOST', 'LLVM-HOST-NOT' unknown prefixes flang\test\Driver\fopenmp.f90 unknown CHECK-LD-ANY, CHECK-LD-ANYMD prefixes

I don't mind taking a look at these two. How do I reproduce them?

I've checked buildkite logs. As for "unknown" - this prefixes simply not defined in that files.

tblah added a commit to tblah/llvm-project that referenced this pull request May 20, 2024
I believe these were forgotten when copying the clang in llvm#86816.

This was flagged because the CHECK lines for CHECK-LD-ANY* had no
associated RUN line. See
llvm#92387 (comment)
@tblah
Copy link
Contributor

tblah commented May 20, 2024

@skatrak @agozillon please could you take a look at flang/test/Lower/OpenMP/function-filtering-2.f90. It looks like we are still generating the offloading main function when compiling for the host.

tblah added a commit that referenced this pull request May 22, 2024
I believe these were forgotten when copying the clang in #86816.

This was flagged because the CHECK lines for CHECK-LD-ANY* had no
associated RUN line. See
#92387 (comment)
@klensy klensy force-pushed the filecheck-flang branch from fa0b803 to 8fb150a Compare May 28, 2024 09:40
@klensy klensy force-pushed the filecheck-flang branch from 8fb150a to 22892c4 Compare May 31, 2024 11:38
@klensy
Copy link
Contributor Author

klensy commented May 31, 2024

CI looks green, finally.

Only one test unsolved left from #92387 (comment)

@tblah
Copy link
Contributor

tblah commented Jun 4, 2024

CI looks green, finally.

Only one test unsolved left from #92387 (comment)

Hopefully this will be fixed by #94330

@tblah
Copy link
Contributor

tblah commented Jun 4, 2024

Oh, flang/test/Driver/omp-cse-region-boundary.f90 fails now too.

flang/test/Driver/omp-cse-region-boundary.f90:16:18: error: CHECK-HOST-NOT: excluded string found in input
                          CHECK-HOST-NOT: arith.constant 10
<stdin>:14:15: note: found here
                        %c10_i32_0 = arith.constant 10 : i32

Ping @skatrak @jsjodin @agozillon

@agozillon
Copy link
Contributor

Oh, flang/test/Driver/omp-cse-region-boundary.f90 fails now too.

flang/test/Driver/omp-cse-region-boundary.f90:16:18: error: CHECK-HOST-NOT: excluded string found in input
                          CHECK-HOST-NOT: arith.constant 10
<stdin>:14:15: note: found here
                        %c10_i32_0 = arith.constant 10 : i32

Ping @skatrak @jsjodin @agozillon

I have a feeling this test may now be a bit redundant now with the ISA changes to the target region, CSE should function on both the host and device the same now I would imagine and I believe it'd function like it does on device currently for host and device. I imagine removal is the way to go, but amending both host and device checks to be identical would be another route @skatrak will likely know better, but I believe he is on vacation until sometime next week unfortunately

@skatrak
Copy link
Member

skatrak commented Jun 26, 2024

Oh, flang/test/Driver/omp-cse-region-boundary.f90 fails now too.

flang/test/Driver/omp-cse-region-boundary.f90:16:18: error: CHECK-HOST-NOT: excluded string found in input
                          CHECK-HOST-NOT: arith.constant 10
<stdin>:14:15: note: found here
                        %c10_i32_0 = arith.constant 10 : i32

Ping @skatrak @jsjodin @agozillon

I have a feeling this test may now be a bit redundant now with the ISA changes to the target region, CSE should function on both the host and device the same now I would imagine and I believe it'd function like it does on device currently for host and device. I imagine removal is the way to go, but amending both host and device checks to be identical would be another route @skatrak will likely know better, but I believe he is on vacation until sometime next week unfortunately

I agree, this test can be deleted altogether. Since we made omp.target IsolatedFromAbove a while back it's been the expected behavior that constants used inside of target regions must be defined in it, and this test was created when we had a different approach in mind.

@klensy
Copy link
Contributor Author

klensy commented Jun 26, 2024

I agree, this test can be deleted altogether. Since we made omp.target IsolatedFromAbove a while back it's been the expected behavior that constants used inside of target regions must be defined in it, and this test was created when we had a different approach in mind.

So, remove omp-cse-region-boundary.f90 test completely?

@klensy klensy force-pushed the filecheck-flang branch from aa8e54e to 0c78dde Compare June 26, 2024 13:18
klensy pushed a commit to klensy/llvm-project that referenced this pull request Jun 26, 2024
Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CI passes. Thank you for persisting with this.

klensy pushed a commit to klensy/llvm-project that referenced this pull request Feb 4, 2025
@klensy
Copy link
Contributor Author

klensy commented Feb 4, 2025

Rebased. Last time didn't merged.

@klensy
Copy link
Contributor Author

klensy commented Feb 4, 2025

Fixed email, sorry.

Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. This still passes for me

@klensy
Copy link
Contributor Author

klensy commented Feb 5, 2025

Should i request review from someone else before merging?

@tblah
Copy link
Contributor

tblah commented Feb 5, 2025

Should i request review from someone else before merging?

I think it is okay to go ahead. Everyone tagged in this PR has had more than a day to notice the activity and Flang reviewers tend to be quite active.

@klensy
Copy link
Contributor Author

klensy commented Feb 5, 2025

Then please merge, as i don't have this ability, thanks.

@TIFitis TIFitis merged commit c491cbf into llvm:main Feb 5, 2025
8 checks passed
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
MacDue pushed a commit that referenced this pull request Feb 28, 2025
cheezeburglar pushed a commit to cheezeburglar/llvm-project that referenced this pull request Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants