Segher Boessenkool <seg...@kernel.crashing.org> writes:
> It isn't likely that any other pass would try to create this pattern,
> but this isn't guaranteed, and such other passes do not necessarily do
> the add-the-clobber (that is specific to combine, even!)  Maybe fwprop
> could create this insn, or something like Richard's new combine-like
> pass.

FWIW, the rtl-ssa stuff also tries to add this kind of clobber where
necessary, meaning that fwprop now does too.  But that's only a comment
about those specific examples, not the general point.

In both cases, adding the clobber is part of recognising an instruction,
and can fail if the clobbered register is currently live.  Then of
course there's the decision about whether the split form is actually
a win.  So splits with clobbers would only conditionally succeed,
even in passes that know how to add them.

I agree with Uros that it seems unlikely that a pass would be allowed
to split one pattern that doesn't match without checking whether the
resulting instructions match, and without checking their cost.

Thanks,
Richard

Reply via email to