llvm-project/mlir/utils
Sean Silva 0aa97ad5c8 [mlir] Change generate-test-checks.py to `%[[V:.*]]` style
Summary:
This style seems to be the preferred style lately as it plays better
with op syntaxes that include `[` and `]`.

Input:
```
module {
  func @f(%arg0 : i32) -> i32 {
    %0 = addi %arg0, %arg0 : i32
    %1 = muli %arg0, %0 : i32
    return %1 : i32
  }
}
```

New output:

```
// NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
// CHECK:       module {

// CHECK-LABEL:   func @f(
// CHECK-SAME:            %[[VAL_0:.*]] : i32) -> i32 {
// CHECK:           %[[VAL_1:.*]] = addi %[[VAL_0]], %[[VAL_0]] : i32
// CHECK:           %[[VAL_2:.*]] = muli %[[VAL_0]], %[[VAL_1]] : i32
// CHECK:           return %[[VAL_2]] : i32
// CHECK:         }
// CHECK:       }
```

Old output:
```
// NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
// CHECK:       module {

// CHECK-LABEL:   func @f(
// CHECK-SAME:            [[VAL_0:%.*]] : i32) -> i32 {
// CHECK:           [[VAL_1:%.*]] = addi [[VAL_0]], [[VAL_0]] : i32
// CHECK:           [[VAL_2:%.*]] = muli [[VAL_0]], [[VAL_1]] : i32
// CHECK:           return [[VAL_2]] : i32
// CHECK:         }
// CHECK:       }
```

Differential Revision: https://reviews.llvm.org/D79836
2020-05-13 14:50:14 -07:00
..
emacs Update header notices. 2019-03-29 17:43:20 -07:00
spirv [mlir][spirv] NFC: use Optional to replace SPV_Optional 2020-04-13 15:44:06 -04:00
textmate Use simpler highlighting textmate syntax 2019-11-15 09:29:40 -08:00
vim Fix the MLIR Vim syntax file: the keyword group was missing 2019-12-26 04:50:38 +00:00
generate-test-checks.py [mlir] Change generate-test-checks.py to `%[[V:.*]]` style 2020-05-13 14:50:14 -07:00