From: Gabor Greif Date: Thu, 12 Jun 2008 21:51:29 +0000 (+0000) Subject: fix a minor deviation from the original in my previous commit X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=52ed363fd31e9f3952c36b760830dbcbebe9d753;p=oota-llvm.git fix a minor deviation from the original in my previous commit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52247 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index ce417831984..c04df4a749b 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -8287,7 +8287,7 @@ static unsigned EnforceKnownAlignment(Value *V, 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(*i) || !cast(*i)->isNullValue()) { AllZeroOperands = false;