SCEV: When expanding a GEP the final addition to the base pointer has NUW but not...
[oota-llvm.git] / lib / Analysis / ScalarEvolution.cpp
index 205227ca0b7fb39ee85b8c3f31b20077fb9fd1ca..1d55642079a085758ece0aad0096111fb4d6c08a 100644 (file)
@@ -3187,7 +3187,7 @@ const SCEV *ScalarEvolution::createNodeForGEP(GEPOperator *GEP) {
 
   // Add the total offset from all the GEP indices to the base.
   return getAddExpr(BaseS, TotalOffset,
-                    isInBounds ? SCEV::FlagNSW : SCEV::FlagAnyWrap);
+                    isInBounds ? SCEV::FlagNUW : SCEV::FlagAnyWrap);
 }
 
 /// GetMinTrailingZeros - Determine the minimum number of zero bits that S is