aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2008-06-12 21:51:29 +0000
committerGabor Greif <ggreif@gmail.com>2008-06-12 21:51:29 +0000
commit52ed363fd31e9f3952c36b760830dbcbebe9d753 (patch)
tree92bffec63e2856d527548a2d6cd3768f51d134d9
parent177dd3ff11bbf557d9d9b98f32680b39c9cca3a1 (diff)
downloadexternal_llvm-52ed363fd31e9f3952c36b760830dbcbebe9d753.zip
external_llvm-52ed363fd31e9f3952c36b760830dbcbebe9d753.tar.gz
external_llvm-52ed363fd31e9f3952c36b760830dbcbebe9d753.tar.bz2
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
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index ce41783..c04df4a 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<Constant>(*i) ||
!cast<Constant>(*i)->isNullValue()) {
AllZeroOperands = false;