<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/124308>124308</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [mlir][vector] What passes should we test in vector-to-llvm.mlir?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            banach-space
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          banach-space
      </td>
    </tr>
</table>

<pre>
    As highlighted in [this comment](https://github.com/llvm/llvm-project/pull/121440#issuecomment-2608058594), tests in:

* [test/Conversion/VectorToLLVM/vector-to-llvm.mlir](https://github.com/llvm/llvm-project/blob/main/mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir)

currently exercise the full [ConvertVectorToLLVMPass](https://github.com/llvm/llvm-project/blob/2068b1ba031e258a6448bea372005d19692c802a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp#L63-L125). This is due to the use of `-convert-vector-to-llvm` in that file. However, given the location of this test file, it should focus exclusively on testing "Vector to LLVM **conversion patterns**," specifically:

* [populateVectorToLLVMConversionPatterns](https://github.com/llvm/llvm-project/blob/d839c06719128700bdd033361b20aa6899f6620a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp#L1906-L1929).

These conversion patterns are included in `ConvertVectorToLLVMPass`, which is why [we are using](https://github.com/llvm/llvm-project/blob/main/mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir#L1) `-convert-vector-to-llvm`. However, it is important to ensure that "vector-to-llvm.mlir" tests only the conversions from `populateVectorToLLVMConversionPatterns`. Tests for other patterns should be moved to separate, appropriate test files.

**Proposed Actions:**
* Audit "vector-to-llvm.mlir" to ensure that it only tests conversions from `populateVectorToLLVMConversionPatterns`.
* Relocate tests for other patterns to "test/Dialect/Vector" or other suitable test files.

Thanks for taking a look!
-Andrzej
</pre>
<img width="1" height="1" alt="" src="http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