This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: combiner bug and fix
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: denisc at overta dot ru
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Jun 03 11:59:05 EDT
- Subject: 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?