Commit 9c62d572 authored by Craig Topper's avatar Craig Topper
Browse files

[X86] Create PSUBUS from (add (umax X, C), -C)

InstCombine seems to canonicalize or PSUB patter into a max with the cosntant and an add with an inverse of the constant.

This patch recognizes this pattern and turns it into PSUBUS. Future work could improve undef element handling.

Fixes some of PR40053

Differential Revision: https://reviews.llvm.org/D55780

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349519 91177308-0d34-0410-b5e6-96231b3b80d8
parent 6eed1f87
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment