[PATCH] D30563: [APInt] Implement getLowBitsSet/getHighBitsSet/getBitsSet using setLowBits/setHighBits/setBits

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 23:45:11 PST 2017


craig.topper created this revision.

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.


https://reviews.llvm.org/D30563

Files:
  include/llvm/ADT/APInt.h
  unittests/ADT/APIntTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30563.90433.patch
Type: text/x-patch
Size: 4130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170303/44ff0456/attachment.bin>


More information about the llvm-commits mailing list