Issue 124308
Summary [mlir][vector] What passes should we test in vector-to-llvm.mlir?
Labels mlir
Assignees banach-space
Reporter banach-space
    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
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to