[Mlir-commits] [mlir] [mlir][linalg] Align `elementwise` builder to do type-conversion of input to result type (PR #190566)

Javed Absar llvmlistbot at llvm.org
Fri Apr 17 12:52:19 PDT 2026


javedabsar1 wrote:

!ping @rengolin  
This should be now along the lines of what you suggested above. i.e.
```
Currently for linalg.elementwise if input is different from result type then it is not buildable.
This diff now performs type conversion on the inputs to make them same as output (result) type
before the computation.
```
I did not want to remove the `trunc` of inputs in case result type if narrower. If everyone
reckons that is the way to go, I am happy to disallow trunc.

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


More information about the Mlir-commits mailing list