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.
Differential D99687
[SCEV] Compute ranges for lshr recurrences reames on Wed, Mar 31, 2:26 PM. Authored by
Details
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 Comment Actions Rebase over requested tests, and narrow initial scope to lshr only. Will return to ashr once this lands. |