Check against >= 0 instead of != -1 in getSplatIndex because it generally compiles...
authorCraig Topper <craig.topper@gmail.com>
Tue, 6 Aug 2013 05:07:37 +0000 (05:07 +0000)
committerCraig Topper <craig.topper@gmail.com>
Tue, 6 Aug 2013 05:07:37 +0000 (05:07 +0000)
llvm-svn: 187774

llvm/include/llvm/CodeGen/SelectionDAGNodes.h

index 468c8b920fe4f4499fbd684325c978bd556cbe45..5fdbe44aafd1a9dc02fa4c1d98d9dbe49a1dbd1a 100644 (file)
@@ -1202,7 +1202,7 @@ public:
     assert(isSplat() && "Cannot get splat index for non-splat!");
     EVT VT = getValueType(0);
     for (unsigned i = 0, e = VT.getVectorNumElements(); i != e; ++i) {
-      if (Mask[i] != -1)
+      if (Mask[i] >= 0)
         return Mask[i];
     }
     return -1;