From: Tobias Grosser Date: Tue, 29 May 2012 09:11:59 +0000 (+0000) Subject: Mark the increments of the generated induction variables 'NSW' X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=400a4ac6586460f195c63e78c04ab1016882841d;p=platform%2Fupstream%2Fllvm.git 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 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride, 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;