As being pointed out in https://github.com/halide/Halide/pull/6545 we don't codegen `a < b ? b - a : a - b` as well as we do `max(a, b) - min(a, b)` https://godbolt.org/z/MvMj9MPW9 https://alive2.llvm.org/ce/z/pVHePi The question is, what do we think is more canonical in IR?