http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52919
Bug #: 52919
Summary: shift expansion mishandles SHIFT_COUNT_TRUNCATED on
partial integer modes
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: [email protected]
ReportedBy: [email protected]
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.