[llvm-commits] [llvm] r154910 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp test/Analysis/ScalarEvolution/nsw-offset.ll test/Analysis/ScalarEvolution/nsw.ll
Duncan Sands
baldrick at free.fr
Tue Apr 17 00:02:15 PDT 2012
Hi Benjamin,
> Revert "SCEV: When expanding a GEP the final addition to the base pointer has NUW but not NSW."
>
> This isn't right either, reverting for now.
>
> Modified:
> llvm/trunk/lib/Analysis/ScalarEvolution.cpp
> llvm/trunk/test/Analysis/ScalarEvolution/nsw-offset.ll
> llvm/trunk/test/Analysis/ScalarEvolution/nsw.ll
>
> Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=154910&r1=154909&r2=154910&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
> +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Tue Apr 17 01:33:57 2012
> @@ -3187,7 +3187,7 @@
>
> // Add the total offset from all the GEP indices to the base.
> return getAddExpr(BaseS, TotalOffset,
> - isInBounds ? SCEV::FlagNUW : SCEV::FlagAnyWrap);
> + isInBounds ? SCEV::FlagNSW : SCEV::FlagAnyWrap);
NSW doesn't look right either...
Ciao, Duncan.
More information about the llvm-commits
mailing list