[SCEV] Compute ranges for ashr recurrences
authorPhilip Reames <listmail@philipreames.com>
Wed, 28 Apr 2021 19:35:22 +0000 (12:35 -0700)
committerPhilip Reames <listmail@philipreames.com>
Wed, 28 Apr 2021 19:36:20 +0000 (12:36 -0700)
commita836de0bdef2ed25e46bd304f3a53a1f08be51c4
treecf9d1135af506326339c71b55aaf851b5b746a6a
parent3b1325cbd39dabc294df409e244ad0b787602ff9
[SCEV] Compute ranges for ashr recurrences

Straight forward extension to the recently added infrastructure which was pioneered with shl. This was originally posted as part of D99687, but split off for ease of review.

(I also decided to exclude the unknown start sign case explicitly for simplicity of understanding.)

Differential Revision: https://reviews.llvm.org/D101181
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/shift-recurrences.ll