This is an archive of the discontinued LLVM Phabricator instance.

[KnownBits] Add methods for determining if the known bits represent a negative/nonnegative number and add methods for changing the negative/nonnegative state
ClosedPublic

Authored by craig.topper on Apr 28 2017, 11:18 AM.

Details

Summary

This patch adds isNegative, isNonNegative for querying whether the sign bit is known. It also adds makeNegative and makeNonNegative for controlling the sign bit.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Apr 28 2017, 11:18 AM
RKSimon accepted this revision.Apr 29 2017, 1:51 AM

LGTM

This revision is now accepted and ready to land.Apr 29 2017, 1:51 AM
This revision was automatically updated to reflect the committed changes.