[Mlir-commits] [mlir] [mlir][vector] Add pattern for dropping unit dims from for loops (PR #109585)

Benjamin Maxwell llvmlistbot at llvm.org
Mon Sep 23 10:05:39 PDT 2024


================
@@ -1090,9 +1084,13 @@ struct ForOpTensorCastFolder : public OpRewritePattern<ForOp> {
         continue;
 
       // Create a new ForOp with that iter operand replaced.
+      ValueTypeCastFnTy castFn = [](OpBuilder &b, Location loc, Type type,
----------------
MacDue wrote:

Though if using a `function_ref` you would have to use `auto` here (assigning to the reference could be a UAF). 

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


More information about the Mlir-commits mailing list