[PATCH] D145395: [SCEV] Also strengthen flags for post-increment.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 00:15:03 PST 2023


nikic added inline comments.


================
Comment at: llvm/test/Analysis/ScalarEvolution/solve-quadratic-i1.ll:12
 ; CHECK-NEXT:    %v1 = phi i16 [ 1, %b0 ], [ %v3, %b1 ]
-; CHECK-NEXT:    --> {1,+,2,+,1}<%b1> U: full-set S: full-set Exits: 3 LoopDispositions: { %b1: Computable }
+; CHECK-NEXT:    --> {1,+,2,+,1}<nsw><%b1> U: [1,-32768) S: [1,-32768) Exits: 3 LoopDispositions: { %b1: Computable }
 ; CHECK-NEXT:    %v2 = add nsw i16 %v0, 1
----------------
mkazantsev wrote:
> It's amazing how pessimistic we are here. Everything is going through `nsw`, but we still manage to cross upper bound of signed range. Sigh...
It's a half-open range, so this doesn't actually cross the upper bound.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145395/new/

https://reviews.llvm.org/D145395



More information about the llvm-commits mailing list