This is an archive of the discontinued LLVM Phabricator instance.

[IPSCCP] Add getCompare which returns either true, false, undef or null.
ClosedPublic

Authored by fhahn on Feb 26 2018, 6:16 AM.

Details

Summary

getCompare returns true, false or undef constants if the comparison can
be evaluated, or nullptr if it cannot. This is in line with what
ConstantExpr::getCompare returns. It also allows us to use
ConstantExpr::getCompare for comparing constants.

Diff Detail

Event Timeline

fhahn created this revision.Feb 26 2018, 6:16 AM
fhahn updated this revision to Diff 135893.Feb 26 2018, 6:24 AM

Improve checks in test case

davide accepted this revision.Mar 5 2018, 8:08 AM

lgtm.

This revision is now accepted and ready to land.Mar 5 2018, 8:08 AM
This revision was automatically updated to reflect the committed changes.