[llvm] r309283 - [SelectionDAG] Avoid repeated calls to getNumOperands in for loop. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 27 08:42:21 PDT 2017
Author: rksimon
Date: Thu Jul 27 08:42:21 2017
New Revision: 309283
URL: http://llvm.org/viewvc/llvm-project?rev=309283&view=rev
Log:
[SelectionDAG] Avoid repeated calls to getNumOperands in for loop. NFCI.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=309283&r1=309282&r2=309283&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Thu Jul 27 08:42:21 2017
@@ -2989,7 +2989,7 @@ SDValue DAGTypeLegalizer::convertMask(SD
// Make a new Mask node, with a legal result VT.
SmallVector<SDValue, 4> Ops;
- for (unsigned i = 0; i < InMask->getNumOperands(); ++i)
+ for (unsigned i = 0, e = InMask->getNumOperands(); i < e; ++i)
Ops.push_back(InMask->getOperand(i));
SDValue Mask = DAG.getNode(InMaskOpc, SDLoc(InMask), MaskVT, Ops);
More information about the llvm-commits
mailing list