This is an archive of the discontinued LLVM Phabricator instance.

[ConstraintElimination] Add initial signed support.
ClosedPublic

Authored by fhahn on Feb 2 2022, 8:54 AM.

Details

Summary

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.

Diff Detail

Event Timeline

fhahn created this revision.Feb 2 2022, 8:54 AM
fhahn requested review of this revision.Feb 2 2022, 8:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2022, 8:54 AM
reames accepted this revision.Feb 3 2022, 8:16 AM

LGTM

Seems like an entirely reasonable starting point.

This revision is now accepted and ready to land.Feb 3 2022, 8:16 AM
This revision was landed with ongoing or failed builds.Feb 4 2022, 6:03 AM
This revision was automatically updated to reflect the committed changes.