[llvm] r187774 - Check against >= 0 instead of != -1 in getSplatIndex because it generally compiles to better code and is equivalent for shuffle indices.
Craig Topper
craig.topper at gmail.com
Mon Aug 5 22:07:37 PDT 2013
Author: ctopper
Date: Tue Aug 6 00:07:37 2013
New Revision: 187774
URL: http://llvm.org/viewvc/llvm-project?rev=187774&view=rev
Log:
Check against >= 0 instead of != -1 in getSplatIndex because it generally compiles to better code and is equivalent for shuffle indices.
Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=187774&r1=187773&r2=187774&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Tue Aug 6 00:07:37 2013
@@ -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;
More information about the llvm-commits
mailing list