This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/17731] sub-optimal code generated for left shift
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 29 Sep 2004 18:11:07 -0000
- Subject: [Bug java/17731] sub-optimal code generated for left shift
- References: <20040929175802.17731.tromey@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-29 18:11 -------
on PPC:
__ZN4test5shiftEii:
rlwinm r5,r5,0,27,31
slw r3,r4,r5
blr
Which is correct as r5 could be greater than 31 and being greater than 31 is undefined (4 bits are only
used really but it could do something different than that).
So if this were to be done correctly, we would need a target hook for the Java front-end.
Note the only reason why I bring this up is because we just had a bootstrap failure where we depended
on being anded by the machine and not in the code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17731