[PATCH] D30525: [APInt] Add setLowBits/setHighBits methods to APInt.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 13:21:58 PST 2017


craig.topper added a comment.

@RKSimon , yes I think getLowBitsSet/getHighBitsSet would also benefit. I think they are mallocing twice due to the getAllOnes and then shifting. So I think we should be able to just create an all 0s APInt then call setLowBits/setHighBits instead and save one of the mallocs.


https://reviews.llvm.org/D30525





More information about the llvm-commits mailing list