[all-commits] [llvm/llvm-project] bea77e: [mlir][Vector] Fold vector.step compared to consta...
James Newling via All-commits
all-commits at lists.llvm.org
Wed Oct 15 08:41:25 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bea77ed52e2d714a9f1a836673733dc5f44a29e3
https://github.com/llvm/llvm-project/commit/bea77ed52e2d714a9f1a836673733dc5f44a29e3
Author: James Newling <james.newling at gmail.com>
Date: 2025-10-15 (Wed, 15 Oct 2025)
Changed paths:
M mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
A mlir/test/Dialect/Vector/canonicalize/vector-step.mlir
Log Message:
-----------
[mlir][Vector] Fold vector.step compared to constant (#161615)
This PR adds a canonicalizer to vector.step that folds vector.step iff
the result of the fold is a splat value. An alternative would be to
always constant fold it, but that might result in some very
large/cumbersome constants.
I do wonder if vector.step might be better represented as some sort of
attribute in the arith dialect, like %step = arith.constant iota<32> :
vector<32xindex>.
---------
Signed-off-by: James Newling <james.newling at gmail.com>
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