[all-commits] [llvm/llvm-project] 606712: Revert "[mlir][vector] Add a pattern to fuse extra...

Quinn Dawkins via All-commits all-commits at lists.llvm.org
Wed Feb 28 07:53:10 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6067129fbe8944d5bd39dc1bc2331ce5ed6ecee8
      https://github.com/llvm/llvm-project/commit/6067129fbe8944d5bd39dc1bc2331ce5ed6ecee8
  Author: Quinn Dawkins <quinn.dawkins at gmail.com>
  Date:   2024-02-28 (Wed, 28 Feb 2024)

  Changed paths:
    M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
    M mlir/test/Dialect/Vector/canonicalize.mlir

  Log Message:
  -----------
  Revert "[mlir][vector] Add a pattern to fuse extract(constant_mask) (#81057)" (#83275)

This reverts commit 5cdb8c0c8854d08ac7ca131ce3e8d78a32eb6716.

This pattern is producing incorrect IR. For example,

```mlir
func.func @extract_subvector_from_constant_mask() -> vector<16xi1> {
  %mask = vector.constant_mask [2, 3] : vector<16x16xi1>
  %extract = vector.extract %mask[8] : vector<16xi1> from vector<16x16xi1>
  return %extract : vector<16xi1>
}
```

Canonicalizes to

```mlir
func.func @extract_subvector_from_constant_mask() -> vector<16xi1> {
  %0 = vector.constant_mask [3] : vector<16xi1>
  return %0 : vector<16xi1>
}
```

Where it should be a zero mask because the extraction index (8) is
greater than the constant mask size along that dim (2).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list