1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

[X86] Check for less than 0 rather than explicit compare with -1. NFC

llvm-svn: 296321
This commit is contained in:
Craig Topper 2017-02-27 06:05:30 +00:00
parent 0f0c173f03
commit 8f6c9e9564

View File

@ -8141,12 +8141,13 @@ static bool isNonZeroElementsInOrder(const SmallBitVector &Zeroable,
// Check if the Mask's nonzero elements are in increasing order.
for (int i = 0, e = Zeroable.size(); i < e; i++) {
// Checks if the mask's zeros elements are built from only zeros.
if (Mask[i] == -1)
assert(Mask[i] >= -1 && "Out of bound mask element!");
if (Mask[i] < 0)
return false;
if (Zeroable[i])
continue;
// Find the lowest non zero element
if (NextElement == -1) {
if (NextElement < 0) {
NextElement = Mask[i] != 0 ? VectorType.getVectorNumElements() : 0;
IsZeroSideLeft = NextElement != 0;
}