This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

Re: optimization/2962: unnecessary instruction cwtl


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


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