This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/17731] sub-optimal code generated for left shift


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]