spatel added a comment. It seems less confusing to me to just make a clamp helper function where we do the swap locally without affecting anyone else. See attached patch proposal. F5449290: clamp.patch <https://reviews.llvm.org/F5449290> https://reviews.llvm.org/D39240