ziliangzl wrote: Hi @kuhar, I submitted another PR (#161057) that adds canonicalization patterns for nested min/max operation with constants. Could you please take a look? https://github.com/llvm/llvm-project/pull/160224