https://github.com/RKSimon commented: This seems reasonable to me - I'd recommend you take a look at the min/max reductions to see if signed/unsigned can be correctly handled with this approach. https://github.com/llvm/llvm-project/pull/116243