This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Combine Pass Behavior
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Oleg Endo <oleg dot endo at t-online dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 12 Oct 2011 10:08:09 +0200
- Subject: Re: Combine Pass Behavior
- References: <1318301863.19997.311.camel@yam-132-YW-E178-FTW>
> The actual problem (or maybe my misunderstanding) is that it
> combines the two original insns, then does some substitutions and tries
> to match the combined and transformed insn against those defined in the
> machine description. If it can't find anything there it reverts
> everything and proceeds with the next insn pair. It never tries out the
> straight forward option in the first place (which is not to transform
> the combination).
The combiner pass does some form of canonicalization to better combine, see
expand_compound_operation and make_compound_operation.
> Is the scenario above intended behavior of the combine pass or an
> accident? Or maybe even something else wrong in the machine description
> that makes it behave like that?
See how the i386 back-end copes with this for its "test" instruction.
--
Eric Botcazou