By the way, to be consistent, getTypeSize for an APInt should return the number of bits rounded up to a multiple of 8, rather than rounded up to a power of 2 as it is now. Shall I make this change? Ciao, Duncan.