[PATCH] D78498: [mlir] [linalg] Only promote selected buffers.
    Thomas Preud'homme via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Apr  6 06:56:55 PDT 2021
    
    
  
thopre added inline comments.
Herald added subscribers: dcaballe, cota, mravishankar, teijeong, rdzhabarov, tatianashp, limo1996, msifontes, jurahul, Kayjukh, stephenneuendorffer.
Herald added a project: MLIR.
================
Comment at: mlir/test/Dialect/Linalg/transform-patterns.mlir:439-446
+// CHECK-NOT:     %[[v1:.*]] = std.view %[[a1]][][{{%.*}}, {{%.*}}] : memref<?xi8> to memref<?x?xf32>
+// CHECK-NOT:     %[[l0:.*]] = subview %[[v1]][{{%.*}}, {{%.*}}] [{{%.*}}, {{%.*}}] [{{%.*}}, {{%.*}}] : memref<?x?xf32> to memref<?x?xf32, #[[map]]>
+// CHECK-NOT:     %[[a2:.*]] = alloc({{%.*}}) : memref<?xi8>
+// CHECK-NOT:     %[[v2:.*]] = std.view %[[a2]][][{{%.*}}, {{%.*}}] : memref<?xi8> to memref<?x?xf32>
+// CHECK-NOT:     %[[l0:.*]] = subview %[[v2]][{{%.*}}, {{%.*}}] [{{%.*}}, {{%.*}}] [{{%.*}}, {{%.*}}] : memref<?x?xf32> to memref<?x?xf32, #[[map]]>
+// CHECK:         linalg.copy(%[[s0]], %[[l0]]) : memref<?x?xf32, #map{{.*}}>, memref<?x?xf32, #map{{.*}}>
+// CHECK-NOT:     linalg.copy(%[[s1]], %[[l1]]) : memref<?x?xf32, #map{{.*}}>, memref<?x?xf32, #map{{.*}}>
----------------
These checks do not work because they refer to undefined variables because each CHECK-NOT is checked independently. Since these are patterns that should not occur the variables defined in them have nothing to be set to.
Currently these will always succeed because the use of an undefined variable is interpreted by FileCheck as being a failure to match, and thus those CHECK-NOT are satisfied. I'd suggest replacing them with CHECK-NEXT as generated by update_test_checks.py. Alternatively you could join all CHECK-NOT in a CHECK-NOT block with {{(.*[[:space:]])+}} but that would become quite unreadable.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78498/new/
https://reviews.llvm.org/D78498
    
    
More information about the llvm-commits
mailing list