A question about changing mlir Operation result types

I’m relatively new to MLIR.
Is it possible to change the result type of an MLIR operation, e.g. after creating it with clone() from an existing operation, and replacing the operands?
If so, what is the way to do that?


It is possible to call setType on a particular value defined by an operation. It isn’t possible to change the number of results though.

1 Like

this works!

thanks for the quick and good response!