This is an archive of the discontinued LLVM Phabricator instance.

[ScalarEvolution] Extend SCEV implication analysis with division
AbandonedPublic

Authored by mkazantsev on Mar 6 2017, 5:53 AM.

Details

Summary

This patch introduces the following rules related to division to SCEV:

  1. FoundLHS > FoundRHS > 0 ---> FoundLHS / 2 > 0 >= RHS.
  2. FoundLHS >= FoundRHS > 0 ---> FoundLHS / 2 >= 0 >= RHS.
  3. FoundLHS >= FoundRHS, 0 < Denum <= FoundRHS ---> LHS = FoundLHS / Denum >= 1 >= RHS.

These rules related to signed division and are not currently covered by existing analysis.

Diff Detail

Event Timeline

mkazantsev created this revision.Mar 6 2017, 5:53 AM
mkazantsev planned changes to this revision.Mar 6 2017, 8:00 PM

Need to add tests.

mkazantsev abandoned this revision.Mar 7 2017, 3:37 AM

Needs massive rework.