This is an archive of the discontinued LLVM Phabricator instance.

[APInt] Implement getLowBitsSet/getHighBitsSet/getBitsSet using setLowBits/setHighBits/setBits
ClosedPublic

Authored by craig.topper on Mar 2 2017, 11:45 PM.

Details

Summary

This patch implements getLowBitsSet/getHighBitsSet/getBitsSet in terms of the new setLowBits/setHighBits/setBits methods by making an all 0s APInt and then calling the appropriate set method.

This also adds support to setBits to allow loBits/hiBits to be in the other order to match with getBitsSet behavior.

Diff Detail

Repository
rL LLVM

Event Timeline

hans accepted this revision.Mar 6 2017, 10:00 AM

lgtm

This revision is now accepted and ready to land.Mar 6 2017, 10:00 AM
This revision was automatically updated to reflect the committed changes.