On Mar 12, 2007, at 11:41 PM, Zhou Sheng wrote: > For expression like > "APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth)", > to handle ShiftAmt == BitWidth situation, use zextOrCopy() instead of > zext().
In CVS head instcombine, this zextOrCopy method is only used in one place. Instead of doing this idiom, please add a new APInt::getLowBitsSet(i, j), where i is the size of the value and j is the number of low bits set in it. Instcombine currently also does (apint(i, 1)<<j) - 1 to compute this. These uses should call APInt::getLowBitsSet as well. -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits