This is the mail archive of the gcc@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: Combine Pass Behavior


> 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


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