This is the mail archive of the gcc-patches@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: [RTL] Canonicalize commutative operations more


> I can, but then I am giving lshift higher priority than every other
> operation, not just rshift. And if I want to give (vec_select x 0) a
> higher precedence than (vec_select x 1) but lower than (vec_select
> (vec_concat a b) 1), the weights may become complicated, whereas the
> comparison function could just recurse.

You cannot have both transitivity and fast-tracks in the comparison function.
However it isn't clear (at least to me) if transitivity is really required.

(vec_select x 0) and (vec_select x 1) are the same pattern so they shouldn't 
be distinguished here.

> I wonder if those issues might in most cases be bugs in the back-ends
> (optimizations missed depending on the order), that the canonicalization
> would make more noticable (and thus easier to fix).

There are certainly such issues in the back-ends (and even ??? comments about 
it) so sensible canonicalization is desirable.

-- 
Eric Botcazou


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