[InstCombine] Reduce absolute diff from min+max+sub
This patch implements fold: max(a,b) nsw/nuw - min(a,b) --> abs(a nsw - b) Alive2: https://alive2.llvm.org/ce/z/4yLp7D Fixes: https://github.com/llvm/llvm-project/issues/61228 Signed-off-by:Jun Zhang <jun@junz.org> Differential Revision: https://reviews.llvm.org/D145540
Loading
Please sign in to comment