The code for SHIFT_COUNT_TRUNCATED in expmed.c:expand_shift_1 improperly uses GET_MODE_BITSIZE instead of GET_MODE_PRECISION when calculating the truncation value. This can result in failure to identify an acceptable shift operation; e.g. with a PSImode with 20 bits of precision, a shift of 20 may be requested.
Created attachment 27119 [details]
Replace GET_MODE_BITSIZE with GET_MODE_PRECISION where necessary