Hi!

On Sat, Nov 15, 2025 at 09:51:17AM -0700, Jeff Law wrote:
> This patch adjusts the core zero-extension patterns as well as one closely
> related combiner pattern.

There are two completely unrelated things, both often called "combiner
pattern".  Firstly, you can have define_insn's or
define_insn_and_split's for patterns that are often the result of
combining two insns.  This kind of thing often leads to more problems
than it helps you: you are pretending some insns exist, that do not
really, and there likely are many places that do not "properly" handle
those insns (whatever "handle properly" means for imaginary insns!)

You also need to handle these in many other passes, if you have such
fake insns.

Pretending your machine has insns it doesn't usually causes nasty
problems.

Secondly, you can have define_split's that are meant to trigger during
combine.  This is perfectly normal, part of the design of combine.  It
should be used more often.

Many places that use define_insn_and_split can be easily converted to
use a define_split instead, avoiding a lot of problems.

When the result of a combine attempt is not recog()nised, combine will
try to split that attempted insn in a few ways, in the first place it
will use a define_split if that exists.

Such splitters almost never cause problems if properly written, combine
will never try it for any recog()nised insn after all.  And OTOH all
define_insn_and_split's done for similar reasons cause no end of
problems.


Segher

Reply via email to