[llvm-commits] [polly] r157606 - /polly/trunk/lib/CodeGen/LoopGenerators.cpp

Tobias Grosser grosser at fim.uni-passau.de
Tue May 29 02:11:59 PDT 2012


Author: grosser
Date: Tue May 29 04:11:59 2012
New Revision: 157606

URL: http://llvm.org/viewvc/llvm-project?rev=157606&view=rev
Log:
Mark the increments of the generated induction variables 'NSW'

In general, all code that we produce is NSW.

Modified:
    polly/trunk/lib/CodeGen/LoopGenerators.cpp

Modified: polly/trunk/lib/CodeGen/LoopGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/LoopGenerators.cpp?rev=157606&r1=157605&r2=157606&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/LoopGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/LoopGenerators.cpp Tue May 29 04:11:59 2012
@@ -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;





More information about the llvm-commits mailing list