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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 17 11:21:05 PST 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.

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.

Fixes PR40053


https://reviews.llvm.org/D55780

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/psubus.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55780.178500.patch
Type: text/x-patch
Size: 3854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181217/25e171b5/attachment.bin>


More information about the llvm-commits mailing list