This is the mail archive of the gcc-patches@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: combiner bug and fix


    IMHO: it's buggy because lhs and/or rhs can be (clobber (const_int 0))
    and building of varop are wrong because builded rtl seems like:
    (xor:HI (clobber:QI (const_int 0 [0x0]))
        (clobber:QI (const_int 0 [0x0])))

That's fine.  combine does that in lots of places.  The point is the it
is never supposed to be recognized.  We specifically *don't* want to have
to test for it everywhere.

    It's a wrong rtl which must be rejected by combiner, but it have a
    code XOR which is valid and this rtl will be processed. It is a
    problem because the new rtl
    (zero_extract:HI (xor:HI (clobber:QI (const_int 0 [0x0]))
        (clobber:QI (const_int 0 [0x0])))
        (const_int 1 [0x1])
        (const_int 0 [0x0]))
    
    will be simplified to (const_int 1).

The bug is this simplification.  Where is it happening?


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