https://github.com/nikic requested changes to this pull request. This should be handled via the derefinement path in simplifyWithOpsReplaced. This is a min/max identity, similar to the existing binop identity case. https://github.com/llvm/llvm-project/pull/202748