[x86, SSE] fold 'isPositive' vector integer operations (PR26701)
authorSanjay Patel <spatel@rotateright.com>
Fri, 26 Feb 2016 16:56:03 +0000 (16:56 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 26 Feb 2016 16:56:03 +0000 (16:56 +0000)
commit4402a32b3237c718e339ecb50b76d2bfb87d260d
treefd1220402fa92e095f24a4182dbdbbe21c127e74
parent70c9bc71d4f1a5cceea67ce6724da9080d5e05fa
[x86, SSE] fold 'isPositive' vector integer operations (PR26701)

This is one of the cases shown in:
https://llvm.org/bugs/show_bug.cgi?id=26701

Shift and negate is what InstCombine appears to prefer, so I've started with that pattern.
Note that the 'pcmpeq' instructions are always generating the negative one for the actual
'pcmpgt' comparison in each case (side note: why isn't there an alias mnemonic for that?).

Differential Revision: http://reviews.llvm.org/D17630

llvm-svn: 262036
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-pcmp.ll