X86: Add a couple of target-specific dag combines that turn VSELECTS into psubus...
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 15 Dec 2012 16:47:44 +0000 (16:47 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 15 Dec 2012 16:47:44 +0000 (16:47 +0000)
commit388fc6a988b56a50efff57893a4df14b4d04e1cd
tree1ef73286c3a9317acb791432b39bddb31b746c0e
parentd12de955856204db4cabdd9bcabc82c22d0e85f2
X86: Add a couple of target-specific dag combines that turn VSELECTS into psubus if possible.

We match the pattern "x >= y ? x-y : 0" into "subus x, y" and two special cases
if y is a constant. DAGCombiner canonicalizes those so we first have to undo the
canonicalization for those cases. The pattern occurs in gzip when the loop
vectorizer is enabled. Part of PR14613.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170273 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86InstrFragmentsSIMD.td
lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/psubus.ll [new file with mode: 0644]