GCC Bugzilla has been upgraded from version 4.4.9 to 5.0rc3. If you see any problem, please report it to bug 64968.
Bug 52919 - shift expansion mishandles SHIFT_COUNT_TRUNCATED on partial integer modes
Summary: shift expansion mishandles SHIFT_COUNT_TRUNCATED on partial integer modes
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-09 22:26 UTC by Peter A. Bigot
Modified: 2012-04-09 22:30 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Replace GET_MODE_BITSIZE with GET_MODE_PRECISION where necessary (562 bytes, patch)
2012-04-09 22:30 UTC, Peter A. Bigot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter A. Bigot 2012-04-09 22:26:54 UTC
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.
Comment 1 Peter A. Bigot 2012-04-09 22:30:20 UTC
Created attachment 27119 [details]
Replace GET_MODE_BITSIZE with GET_MODE_PRECISION where necessary