This is an archive of the discontinued LLVM Phabricator instance.

[KnownBits][ValueTracking] Move the math for calculating known bits for add/sub into a static method in KnownBits object
ClosedPublic

Authored by craig.topper on Aug 7 2017, 3:52 PM.

Details

Summary

I want to reuse this code in SimplifyDemandedBits handling of Add/Sub. This will make that easier.

Wonder if we should use it in SelectionDAG's computeKnownBits too.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Aug 7 2017, 3:52 PM
davide edited edge metadata.Aug 8 2017, 8:02 AM

If we can share this with SelDAG as well it would be even more awesome. I have no objections to this refactoring but please wait to hear from David

majnemer accepted this revision.Aug 8 2017, 8:58 AM

LGTM

This revision is now accepted and ready to land.Aug 8 2017, 8:58 AM
This revision was automatically updated to reflect the committed changes.