[all-commits] [llvm/llvm-project] cf0efb: [mlir][vector] Decouple unrolling gather and gathe...

Kunwar Grover via All-commits all-commits at lists.llvm.org
Mon Mar 24 05:25:38 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf0efb31880dab5f5b2f20bda6634c68a42d6908
      https://github.com/llvm/llvm-project/commit/cf0efb31880dab5f5b2f20bda6634c68a42d6908
  Author: Kunwar Grover <groverkss at gmail.com>
  Date:   2025-03-24 (Mon, 24 Mar 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/Transforms/LoweringPatterns.h
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
    M mlir/lib/Dialect/Vector/Transforms/LowerVectorGather.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm-interface.mlir
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp

  Log Message:
  -----------
  [mlir][vector] Decouple unrolling gather and gather to llvm lowering (#132206)

This patch decouples unrolling vector.gather and lowering vector.gather
to llvm.masked.gather.

This is consistent with how vector.load, vector.store,
vector.maskedload, vector.maskedstore lower to LLVM.

Some interesting test changes from this patch:

- 2D vector.gather lowering to llvm tests are deleted. This is
consistent with other memory load/store ops.
- There are still tests for 2D vector.gather, but the constant mask for
these test is modified. This is because with the updated lowering, one
of the unrolled vector.gather disappears because it is masked off (also
demonstrating why this is a better lowering path)

Overall, this makes vector.gather take the same consistent path for
lowering to LLVM as other load/store ops.

Discourse Discussion:
https://discourse.llvm.org/t/rfc-improving-gather-codegen-for-vector-dialect/85011/13



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