1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Check against >= 0 instead of != -1 in getSplatIndex because it generally compiles to better code and is equivalent for shuffle indices.

llvm-svn: 187774
This commit is contained in:
Craig Topper 2013-08-06 05:07:37 +00:00
parent 936da35b0d
commit e1c2f3da6c

View 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;