This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
PR opt/2962 has been fixed
- From: Roger Sayle <roger at eyesopen dot com>
- To: <gcc-bugs at gcc dot gnu dot org>
- Date: Sat, 4 May 2002 20:52:34 -0600 (MDT)
- Subject: PR opt/2962 has been fixed
I believe that PR optimization/2962 has been fixed on mainline by the
recent patch http://gcc.gnu.org/ml/gcc-patches/2002-04/msg01006.html
2002-04-17 Roger Sayle <roger@eyesopen.com>
Jakub Jelinek <jakub@redhat.com>
* fold-const.c (fold) [NOP_EXPR]: Convert (T)(x&c) into ((T)x&(T)c)
for integer constant c (if x has unsigned type or sign bit is not
set in c). This folds the zero/sign extension into the bit-wise
and operation.
We now no longer generate the unnecessary "cwtl" instruction for the
test case in the PR. [Unfortunately with -Os, there is no net space
saving for this example function as mainline also decides to use a
longer but faster load instruction].
Ok to close this PR? I've recently got GNATS access, but I'm not sure
if I'm allowed to edit PRs without the approval of a MAINTAINER.
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833