optimization/2962: unnecessary instruction cwtl
sayle@gcc.gnu.org
sayle@gcc.gnu.org
Mon May 6 20:34:00 GMT 2002
Synopsis: unnecessary instruction cwtl
State-Changed-From-To: analyzed->closed
State-Changed-By: sayle
State-Changed-When: Mon May 6 20:34:42 2002
State-Changed-Why:
This has been fixed on mainline by the recent patch
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].
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2962
More information about the Gcc-bugs
mailing list