This is the mail archive of the
mailing list for the GCC project.
Re: [autovect] [committed] vectorizer idiom recognition support andsaturating subtraction
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: Dorit Naishlos <DORIT at il dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 13 Dec 2004 17:11:45 +0100
- Subject: Re: [autovect] [committed] vectorizer idiom recognition support andsaturating subtraction
- References: <OF82CBC56D.F894CCAA-ONC2256F69.00501D6B-C2256F69.0052B535@il.ibm.com>
This patch adds an analysis pass that searches for computation idioms in
the program. It is a tentative implementation, that invokes the
pattern-recognition pass from within the vectorizer, only on loops that are
candidate for vectorization. The pattern is replaced only if it can be
vectorized. We may want instead to invoke it as a general pass independent
of the vectorizer that searches for such idioms anywhere in the program (as
part of a tree-combine pass?).
Or of phiopt. In fact your patch looks like a different implementation
of phiopt. I had a patch that built a COND_EXPR out of a phi and let
fold recognize/simplify it. Maybe phiopt can become a special case of
the tree-combine pass.
For the particular case of unsigned saturation, it may be worthwhile to
recognize it in fold and (in case the optab does not have an entry for a
particular mode) have different expansions of it depending on the