[all-commits] [llvm/llvm-project] 357e38: [mlir][vector] Prevent folding non memref-type gat...
Sagar Kulkarni via All-commits
all-commits at lists.llvm.org
Fri Apr 11 18:16:12 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 357e3803bb94cc622c785f7eb60aa38d552bc5ef
https://github.com/llvm/llvm-project/commit/357e3803bb94cc622c785f7eb60aa38d552bc5ef
Author: Sagar Kulkarni <sagar.kulkarni1911 at gmail.com>
Date: 2025-04-12 (Sat, 12 Apr 2025)
Changed paths:
M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
M mlir/test/Dialect/Vector/canonicalize.mlir
Log Message:
-----------
[mlir][vector] Prevent folding non memref-type gather into maskedload (#135371)
This patch fixes an issue in the FoldContiguousGather pattern which was
incorrectly folding vector.gather operations with contiguous indices
into vector.maskedload operations regardless of the base operand type.
While vector.gather operations can work on both tensor and memref types,
vector.maskedload operations are only valid for memref types. The
pattern was incorrectly lowering a tensor-based gather into a
masked-load, which is invalid.
This fix adds a type check to ensure the pattern only applies to
memref-based gather operations.
Co-authored-by: Sagar Kulkarni <sagar at rain.ai>
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