On Fri, Dec 05, 2014 at 01:40:56PM -0700, Jeff Law wrote:
> My first thought would be to allow both and have combine swap the order 
> in the vector if recog doesn't recognize the pattern.  One could argue 
> we could go through a full permutation of ordering in the vector, but 
> that's probably above and beyond the call of duty.

Combine also expects a certain ordering for its *inputs*.  It might not
be the only pass that does this either.  All targets (where this works)
have the compare first in all their patterns.  This goes back, what,
20+ years?  It might not be "officially" canonical, but it's the only
ordering that works everywhere.

Why can the compare-elim pass not simply swap the two elts of the parallel
around?  The alternative is to 1) modify all machine descriptions: this
is used many hundreds of times, if not thousands, and modifications are
not trivial (match_dups change location, for example); and 2) read all RTL
code to identify all the places where these implicit assumptions are made.


Segher

Reply via email to