[Mlir-commits] [mlir] [MLIR][Vector] Add unrolling pattern for	vector StepOp (PR #157752)
    Erick Ochoa Lopez 
    llvmlistbot at llvm.org
       
    Mon Sep 15 08:53:52 PDT 2025
    
    
  
================
@@ -809,6 +809,54 @@ struct UnrollBroadcastPattern : public OpRewritePattern<vector::BroadcastOp> {
   vector::UnrollVectorOptions options;
 };
 
+struct UnrollStepPattern : public OpRewritePattern<vector::StepOp> {
+  UnrollStepPattern(MLIRContext *context,
+                    const vector::UnrollVectorOptions &options,
+                    PatternBenefit benefit = 1)
+      : OpRewritePattern<vector::StepOp>(context, benefit), options(options) {}
+
+  LogicalResult matchAndRewrite(vector::StepOp stepOp,
+                                PatternRewriter &rewriter) const override {
+    auto targetShape = getTargetShape(options, stepOp);
----------------
amd-eochoalo wrote:
Can you spell out the type? We use auto when the type is obvious based on the immediate context only: https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable
https://github.com/llvm/llvm-project/pull/157752
    
    
More information about the Mlir-commits
mailing list