[Mlir-commits] [mlir] [mlir][vector] Propagate `vector.extract` through elementwise ops (PR #131462)

Ivan Butygin llvmlistbot at llvm.org
Sat Mar 22 16:15:41 PDT 2025


================
@@ -1043,6 +1043,60 @@ struct ReorderElementwiseOpsOnBroadcast final
   }
 };
 
+/// Pattern to rewrite a ExtractOp(Elementwise) -> Elementwise(ExtractOp).
+/// This may result in more efficient code when we extracting a single value
+/// from multi-element vector and also to help canonicalize 1-element vectors to
+/// scalars.
----------------
Hardcode84 wrote:

changed to "cleaner" )

https://github.com/llvm/llvm-project/pull/131462


More information about the Mlir-commits mailing list