Page MenuHomePhabricator

update simplifyUnsignedRangeCheck function's test case.
AbandonedPublic

Authored by HLJ2009 on Jun 8 2018, 7:03 PM.

Details

Summary

For both operands are unsigned, add the following optimization test case.

  1. X > Y && X != 0 --> X > Y
  2. X > Y || X != 0 --> X != 0
  3. X <= Y || X != 0 --> true
  4. X <= Y || X == 0 --> X <= Y
  5. X > Y && X == 0 --> false

Diff Detail

Event Timeline

HLJ2009 created this revision.Jun 8 2018, 7:03 PM
HLJ2009 edited the summary of this revision. (Show Details)Jun 8 2018, 7:15 PM
HLJ2009 added reviewers: spatel, craig.topper.

Adding Roman as reviewer - do these tests answer the questions from D47922 about whether the existing transform is miscompiling or just incomplete?

Adding Roman as reviewer - do these tests answer the questions from D47922 about whether the existing transform is miscompiling or just incomplete?

These tests are valid as per alive.
But i'm not sure, are they on top of git master, or D47922?
Why there is no test output change in D47922?

@HLJ2009 just in case, let me reiterate:
These tests need to be generated for the svn trunk version of llvm, not D47922.
They should be (when accepted) committed before the dependent revision.
They need to have good coverage, ideally for all the previously-missing cases, and for all the cases that will be affected by the dependent revision. (well, not all, obviously)
Then, D47922 needs to be rebased ontop of this change (and do mark it as a dependent in phabricator, to signify it), and the effect of the code change should be visible in the tests.

HLJ2009 abandoned this revision.Jun 11 2018, 12:09 AM