Support for sgt/slt was added in https://reviews.llvm.org/D29774, this adds the same cases also for unsigned compares.
Alive proof is at: https://rise4fun.com/Alive/nyY
Name: ult
Pre: WillNotOverflowUnsignedSub(C2, C1)
%a = add nuw i8 %x, C1
%b = icmp ult %a, C2
=>
%b = icmp ult %x, C2-C1
Name: ugt
Pre: WillNotOverflowUnsignedSub(C2, C1)
%a = add nuw i8 %x, C1
%b = icmp ugt %a, C2
=>
%b = icmp ugt %x, C2-C1
I updated the tests that changed and added new tests for the new combines.
Please commit the tests first. Use this script to auto-generate the current results. Then, update with this patch and auto-generate the new results.