Hardcode84 wrote: I wonder if we should convert this to `RewritePattern` so greedy driver can handle all the fixed point iteration for us. It will also be better composable with the existing canonicalizations. https://github.com/llvm/llvm-project/pull/230961