Index: llvm/include/llvm/Support/MathExtras.h =================================================================== --- llvm/include/llvm/Support/MathExtras.h +++ llvm/include/llvm/Support/MathExtras.h @@ -14,7 +14,6 @@ #define LLVM_SUPPORT_MATHEXTRAS_H #include "llvm/Support/Compiler.h" -#include #include #include #include @@ -793,7 +792,7 @@ /// value of the result. template std::enable_if_t::value, T> AbsoluteDifference(T X, T Y) { - return std::max(X, Y) - std::min(X, Y); + return X > Y ? X - Y : Y - X; } /// Add two unsigned integers, X and Y, of type T. Clamp the result to the