[Mlir-commits] [mlir] [mlir][linalg] convert arith ops to destination-passing-style. (PR #157854)

Javed Absar llvmlistbot at llvm.org
Sat Sep 13 02:11:36 PDT 2025


================
@@ -603,6 +612,56 @@ Value linalg::bufferizeToAllocation(
 }
 
 namespace {
+template <typename OpTy>
+FailureOr<Operation *>
+rewriteArithInDestinationPassingStyle(RewriterBase &rewriter, OpTy op) {
+  // reject ops such as `arith.constant` and `arith.select`.
----------------
javedabsar1 wrote:

`arith.constant` does not need lowering to DPS because as you know it is not a compute and lowers to llcm.constant. `arith.select` i just ignore and i dont think its important currently for lower-quant-op purposes. We can add more patterns if this first PR is ok with you folks.

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


More information about the Mlir-commits mailing list