Commit Graph

5 Commits

Author SHA1 Message Date
Florian Hahn 6778e2f441
[ConstraintElimination] Add tests with signed predicates and ADDs. 2022-03-28 18:00:18 +01:00
Florian Hahn 0a781d98fb
[ConstraintElimination] Add initial signed support.
This patch adds initial support for signed conditions. To do so,
ConstraintElimination maintains two separate systems, one with facts
from signed and one for unsigned conditions.

To start with this means information from signed and unsigned conditions
is kept completely separate. When it is safe to do so, information from
signed conditions may be also transferred to the unsigned system and
vice versa. That's left for follow-ups.

In the initial version, de-composition of signed values just handles
constants and otherwise just uses the value, without trying to
decompose the operation. Again this can be extended in follow-up
changes.

The main benefit of this limited signed support is proving >=s 0
pre-conditions added in D118799. But even this initial version also
fixes PR53273.

Depends on D118799.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D118806
2022-02-04 14:02:48 +00:00
Florian Hahn cd79ca6136
[ConstraintElimination] Add sub nuw test with signed predicates.
Add missing test coverage for `sub nuw` combined with both unsigned and
signed predicates.
2022-01-28 11:20:57 +00:00
Bjorn Pettersson 8ebb3eac02 [test] Use -passes syntax when specifying pipeline in some more tests
The legacy PM is deprecated, so update a bunch of lit tests running
opt to use the new PM syntax when specifying the pipeline.
In this patch focus has been put on test cases for ConstantMerge,
ConstraintElimination, CorrelatedValuePropagation, GlobalDCE,
GlobalOpt, SCCP, TailCallElim and PredicateInfo.

Differential Revision: https://reviews.llvm.org/D114516
2021-11-27 09:52:55 +01:00
Florian Hahn 972212d29c
[ConstraintElimination] Add tests for signed predicates.
Add test coverage for conditions with signed predicates.
2021-02-01 13:23:05 +00:00