summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-04-07 17:19:26 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-04-07 17:19:26 +0000
commite1f4ca1b0f219b89027c163557ab4ec8e61e0b19 (patch)
tree24acd6f32fa0195b142878c4d60ad05a063325d7 /llvm/lib/Analysis/ScalarEvolution.cpp
parent6f9be7e2c61726cf8a4d6dc080b4c39a77197aff (diff)
downloadbcm5719-llvm-e1f4ca1b0f219b89027c163557ab4ec8e61e0b19.tar.gz
bcm5719-llvm-e1f4ca1b0f219b89027c163557ab4ec8e61e0b19.zip
SCEV: When expanding a GEP the final addition to the base pointer has NUW but not NSW.
Found by inspection. llvm-svn: 154262
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 205227ca0b7..1d55642079a 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -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
OpenPOWER on IntegriCloud