On Fri, 2020-04-24 at 16:36 -0500, Segher Boessenkool wrote: > > In combine itself runs split as well (one insn to two). And you can > add instruction patterns to your machine description that are only there > for combine: you split them to separate insns immediately again (maybe > this is what you meant though?) No, that's not what I meant. What I meant was really custom "combine- like" steps which combine would never do by itself. split1 gives you a simple "interface" to hook into each insn without writing a full custom pass. For example, on SH I've used that to implement additional elimination of sign/zero extending memory loads. On RX I did the same to fold some in-memory operations, which neither combine nor peephole passes would catch otherwise. > Another big problem is that it is very, very hard to write a *correct* > (non-trivial) peephole2. > I agree. Combine patterns are easier to deal with. Cheers, Oleg