[PATCH] D58872: [InstCombine] Start canonicalizing to uadd.sat and usub.sat

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 11:10:31 PDT 2019


spatel added a comment.

I converted umin-based patterns for uaddsat here:
rL357012 <https://reviews.llvm.org/rL357012>
That should give us an x86 improvement in PR14613.

I'm not sure if we are holding this patch up for any other changes, but if not and if the above change doesn't cause trouble, we should push ahead with this patch.



================
Comment at: test/Transforms/InstCombine/unsigned_saturated_sub.ll:4-7
 ; Transforms for unsigned saturated subtraction idioms are tested here.
 ; In all cases, we want to form a canonical min/max op (the compare and
 ; select operands are the same), so that is recognized by the backend.
 ; The backend recognition is tested in test/CodeGen/X86/psubus.ll.
----------------
Remove/update this comment.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58872/new/

https://reviews.llvm.org/D58872





More information about the llvm-commits mailing list