Fix this accidentally inverted condition.
authorDan Gohman <gohman@apple.com>
Sat, 18 Jul 2009 00:58:38 +0000 (00:58 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 18 Jul 2009 00:58:38 +0000 (00:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76278 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Value.cpp

index 66fcaf38fba3cc1b9a0f9ac386f6a1d77990009a..279eabb0ec44c5a50e6b2845cf2d0e052c47fa92 100644 (file)
@@ -363,7 +363,7 @@ Value *Value::getUnderlyingObject() {
   unsigned MaxLookup = 6;
   do {
     if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
-      if (GEP->hasNoPointerOverflow())
+      if (!GEP->hasNoPointerOverflow())
         return V;
       V = GEP->getPointerOperand();
     } else if (Operator::getOpcode(V) == Instruction::BitCast) {