Mark the increments of the generated induction variables 'NSW'
In general, all code that we produce is NSW.
llvm-svn: 157606
diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp
index f56ec41..3688898 100644
--- a/polly/lib/CodeGen/LoopGenerators.cpp
+++ b/polly/lib/CodeGen/LoopGenerators.cpp
@@ -53,7 +53,7 @@
IV->addIncoming(LB, PreheaderBB);
Stride = Builder.CreateZExtOrBitCast(Stride, LoopIVType);
- Value *IncrementedIV = Builder.CreateAdd(IV, Stride, "polly.next_loopiv");
+ Value *IncrementedIV = Builder.CreateNSWAdd(IV, Stride, "polly.next_loopiv");
// Exit condition.
Value *CMP;