[llvm-commits] [llvm] r166531 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Jakub Staszak kubastaszak at gmail.com
Tue Oct 23 17:38:25 PDT 2012


Author: kuba
Date: Tue Oct 23 19:38:25 2012
New Revision: 166531

URL: http://llvm.org/viewvc/llvm-project?rev=166531&view=rev
Log:
Keep coding standard. Don't evaluate getNumOperands() every time.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=166531&r1=166530&r2=166531&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Oct 23 19:38:25 2012
@@ -8434,7 +8434,7 @@
   SmallVector<SDValue, 8> Ops(NewBVElems, Filler);
 
   // Populate the new build_vector
-  for (unsigned i=0; i < N->getNumOperands(); ++i) {
+  for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
     SDValue Cast = N->getOperand(i);
     assert((Cast.getOpcode() == ISD::ANY_EXTEND ||
             Cast.getOpcode() == ISD::ZERO_EXTEND ||





More information about the llvm-commits mailing list