This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Compute ranges for ashr recurrences
ClosedPublic

Authored by reames on Apr 23 2021, 9:47 AM.

Details

Summary

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.)

Diff Detail

Event Timeline

reames created this revision.Apr 23 2021, 9:47 AM
reames requested review of this revision.Apr 23 2021, 9:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 23 2021, 9:47 AM
nikic accepted this revision.Apr 23 2021, 12:31 PM

LGTM

llvm/lib/Analysis/ScalarEvolution.cpp
5695

Outdated TODO

5741

As a general note on this function: You initialize CR to the full set, then always intersect you result with it, and return the intersection... you may as well just directly return your result range.

This revision is now accepted and ready to land.Apr 23 2021, 12:31 PM
This revision was landed with ongoing or failed builds.Apr 28 2021, 12:36 PM
This revision was automatically updated to reflect the committed changes.
reames added inline comments.Apr 28 2021, 12:48 PM
llvm/lib/Analysis/ScalarEvolution.cpp
5741

Done in 0cc3e10f