Currently there are the truncate, zero_extend and sign_extend methods and their siblings into_* for method chaining and strict_* for strict truncation and extension. Besides these a cheap_* sibling might be very useful for operations that shall forcefully be executed with minimal overhead and if it is not possible to truncate or extend an ApInt cheaply the operation will return an Error instead of possibly doing lots of work.
Currently there are the
truncate
,zero_extend
andsign_extend
methods and their siblingsinto_*
for method chaining andstrict_*
for strict truncation and extension. Besides these acheap_*
sibling might be very useful for operations that shall forcefully be executed with minimal overhead and if it is not possible to truncate or extend anApInt
cheaply the operation will return anError
instead of possibly doing lots of work.For this the following APIs are required:
into_cheap_truncate
cheap_truncate
into_cheap_zero_extend
cheap_zero_extend
into_cheap_sign_extend
cheap_sign_extend
into_cheap_zero_resize
cheap_zero_resize
into_cheap_sign_resize
cheap_sign_resize