[SCEV] Infer nsw/nuw from nw for addrecs
authorPhilip Reames <listmail@philipreames.com>
Tue, 24 Aug 2021 00:52:09 +0000 (17:52 -0700)
committerPhilip Reames <listmail@philipreames.com>
Tue, 24 Aug 2021 15:53:21 +0000 (08:53 -0700)
commit914836b1c8b36d4a317ef6c233746f6ec37b57a5
tree4732199274c723f1cb1903d361c65e5a14027057
parentfda176892e64b093996763465338863067e5b09e
[SCEV] Infer nsw/nuw from nw for addrecs

If we no an addrec doesn't self-wrap, the increment is strictly positive, and the start value is the smallest representable value, then we know that the corresponding wrap type can not occur.

Differential Revision: https://reviews.llvm.org/D108601
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/ptrtoint.ll