[Bug rtl-optimization/17731] sub-optimal code generated for left shift
rth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Sep 29 19:39:00 GMT 2004
------- Additional Comments From rth at gcc dot gnu dot org 2004-09-29 19:39 -------
This will be done properly if SHIFT_COUNT_TRUNCATED is true.
The problem is that SHIFT_COUNT_TRUNCATED applies to *all* shifts and at
the given mode size. Which is not true for x86, since HImode shifts are
still masked to 31, not 15.
Ideally we'd extend Richard Sandiford's new target.shift_truncation_mask
such that it can replace SHIFT_COUNT_TRUNCATED.
In the short term, Java could examine shift_truncation_mask and avoid
creating the AND at the tree level in the first place.
Not sure whether "middle-end" or "rtl-opt" is a better category, but this
is definitely not target-specific and thus "target" doesn't apply.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|target |rtl-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17731
More information about the Java-prs
mailing list