[llvm-commits] [llvm] r52247 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Gabor Greif ggreif at gmail.com
Thu Jun 12 14:51:29 PDT 2008


Author: ggreif
Date: Thu Jun 12 16:51:29 2008
New Revision: 52247

URL: http://llvm.org/viewvc/llvm-project?rev=52247&view=rev
Log:
fix a minor deviation from the original in my previous commit

Modified:
    llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=52247&r1=52246&r2=52247&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu Jun 12 16:51:29 2008
@@ -8287,7 +8287,7 @@
   case Instruction::GetElementPtr: {
     // If all indexes are zero, it is just the alignment of the base pointer.
     bool AllZeroOperands = true;
-    for (User::op_iterator i = U->op_begin(), e = U->op_end(); i != e; ++i)
+    for (User::op_iterator i = U->op_begin() + 1, e = U->op_end(); i != e; ++i)
       if (!isa<Constant>(*i) ||
           !cast<Constant>(*i)->isNullValue()) {
         AllZeroOperands = false;





More information about the llvm-commits mailing list