Straight forward extension to the recently added infrastructure which was pioneered with shl.
@reviewers - I always have trouble with wrapping arithmetic, so please sanity check my usage of ranges and reasoning.
Paths
| Differential D99687
[SCEV] Compute ranges for lshr recurrences ClosedPublic Authored by reames on Mar 31 2021, 2:26 PM.
Details Summary Straight forward extension to the recently added infrastructure which was pioneered with shl. @reviewers - I always have trouble with wrapping arithmetic, so please sanity check my usage of ranges and reasoning.
Diff Detail
Event Timeline
Comment Actions I couldn't find tests for the following scenarios:
(I don't claim there is none, but I could not find them in this test file :) )
Comment Actions Need to add additional tests (or pointers to them), but also intentionally stalling this until issues with handling of unreachable code in the underlying infrastructure are resolved and nothing new pops up for a few days.
Comment Actions
test_ashr_tc_positive and test_ashr_tc_negative - not that 128 is INT_MIN for i8
added as test_lshr_zero_shift and test_ashr_zero_shift
Added as test_lshr_power_of_2_start, test_lshr_arbitrary_start, and test_lshr_start_power_of_2_plus_one reames retitled this revision from [SCEV] Compute ranges for ashr/lshr recurrences to [SCEV] Compute ranges for lshr recurrences. Comment ActionsRebase over requested tests, and narrow initial scope to lshr only. Will return to ashr once this lands. This revision is now accepted and ready to land.Apr 22 2021, 1:28 AM This revision was landed with ongoing or failed builds.Apr 22 2021, 11:06 AM Closed by commit rG424d6cb902e4: [SCEV] Compute ranges for lshr recurrences (authored by reames). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 339726 llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/shift-recurrences.ll
|
Any tests for two first cases?