On 11/10/2010 11:58 AM, Georg Lay wrote:
In the old 3.4.x (private port) I introduced a target hook in combine,
just prior to where recog_for_combine gets called. The hook did some
canonicalization of rtx and thereby considerably reduced the number of
patterns that would have been necessary without that hook. It
transformed some unspecs.

How is that related to delegitimize_address?

A second use case of such a hook could look as follows: Imagine a
combined pattern that does not match but would be legal if the backend
knew that some register contains some specific value like, e.g.,
non-negative, zero-or-storeflagvalue, combiner has proved that some
bits will always be set or always be cleared;

You can use nonzero_bits or num_signbit_copies in define_splits. In _this_ case, a define_insn_or_split doesn't really help, I agree with Joern on this. :)

II.
Suppose insns A, B and C with costs f(A) = f(B) = f(C) = 2.

Combine combines A+B and sees costs f(A+B) = 5. This makes combine
reject the pattern, not looking deeper.

Does it really do that? I see nothing in combine_instructions which would prevent going deeper.

Paolo

Reply via email to