llvm-project
4a50d99a - [mlir][emitc] Fix recurring operands in expression (#175535)

Commit
31 days ago
[mlir][emitc] Fix recurring operands in expression (#175535) The pretty-printing for `emitc.expression` breaks for expressions taking the same value as operand multiple times. Passing the same value as operand more than once is redundant, and is therefore not the canonical form of `emitc.expression`. However, since transformations affecting `emitc.expression` operands may cause this to happen, `emitc.expression` must retain its support for recurring operands. This PR fixes this issue by shadowing the region arguments only when the operands are unique, printing and parsing an explicit basic block otherwise. In addition, a canonicalization pattern removing recurring operands is added. Fixes https://github.com/llvm/llvm-project/issues/172952.
Author
Parents
Loading