6 Commits

Author SHA1 Message Date
Max Kazantsev
90ae538cab [SCEV] Prove implication of predicates to their sign-flipped counterparts
This patch teaches SCEV two implication rules:

  x <u y && y >=s 0 --> x <s y,
  x <s y && y <s 0 --> x <u y.

And all equivalents with signs/parts swapped.

Differential Revision: https://reviews.llvm.org/D110517
Reviewed By: nikic
2021-10-15 11:49:18 +07:00
Max Kazantsev
576ab15b90 [Test] Few more symmetrical test for D110517 2021-10-06 19:02:28 +07:00
Max Kazantsev
78873840ff [Test] Add some more symmetrical test cases for D110517
More similar cases to see that the opt we are trying to make is generic enough.
2021-10-06 17:38:48 +07:00
Max Kazantsev
e787678cef [Test] Add some simple tests where IndVars cannot remove a check in loop
Previously I've added tests that require context for inference, but it
seems tha SCEV can't prove same facts even when the context isn't required.
2021-09-27 12:12:51 +07:00
Max Kazantsev
74fa174f33 [Test] One more missing opportunity on IndVars check removal 2021-09-17 14:52:15 +07:00
Max Kazantsev
c78ed20784 [Test] Add a test showing missing opportunities in branch deletion by indvars 2021-09-15 22:17:10 +07:00