This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [autovect] [patch] Improve generated vector comparisons
- From: Victor Kaplansky <VICTORK at il dot ibm dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>, "Richard Guenther" <richard dot guenther at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 May 2006 12:27:09 +0300
- Subject: Re: [autovect] [patch] Improve generated vector comparisons
gcc-patches-owner@gcc.gnu.org wrote on 23.05.2006 00:02:15:
> I will go even farther than Richard Guenther: this patch is
> completely unacceptable.
>
> tree-vect-transform.c is a common part of the compiler supporting
> autovectorization for all GCC targets. Not only should those routines
not
> reference any target-dependent details that are not general purpose
hooks,
> but the explicit reference to TARGET_ALTIVEC breaks the autovect branch
> for all non-PowerPC targets.
>
> As Richard mentions, this should be handled where GCC initially
> generates the Altivec comparisons as RTL.
>
> Please revert this patch.
>
> David
>
I've reverted this patch.
As Richard said, the better way is to perform this transformation at expand
time.
I'll try to propose a new patch. It looks nontrivial to me, since this
transformation requires
swapping of "then" and "else" clauses in all uses of condition. Where can I
look in order to study
how this kind of transformation is done.
-- Victor