HomePhabricator

[x86, SSE] fold 'isPositive' vector integer operations (PR26701)

Description

[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

Details