2 Commits

Author SHA1 Message Date
Sanjay Patel 705f5b195b [x86] avoid flipping sign bits for vector icmp by using known bits
If we know that both operands of an unsigned integer vector comparison are non-negative, 
then it's safe to directly use a signed-compare-greater-than instruction (the only non-equality
integer vector compare predicate provided by SSE/AVX).

We're intentionally not changing the condition code to signed in order to preserve the
existing transforms that use min/max/psubus below here.

This should solve PR33276:
https://bugs.llvm.org/show_bug.cgi?id=33276

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304909 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-07 13:46:34 +00:00
Sanjay Patel b2d54d6280 [x86] add tests for unsigned vector compares with known signbits; NFC (PR33276)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304612 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 23:24:28 +00:00