This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: i386 vector min/max improvements
- From: Daniel Jacobowitz <drow at false dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Henderson <rth at redhat dot com>
- Date: Wed, 29 Jun 2005 14:36:59 -0400
- Subject: Re: i386 vector min/max improvements
- References: <20050629173828.GB21381@redhat.com>
On Wed, Jun 29, 2005 at 10:38:28AM -0700, Richard Henderson wrote:
> Implements stuff for V4SImode along the same lines as I came up with
> for V2SImode on ia64. Also copies the same unsigned saturation tricks
> for vcond and umin.
>
> One new trick for umax: the combination of us_minus and plus results
> in umax without further bit manipulation. There are two cases:
>
> (1) op2 >= op1. In this case we saturate to zero, resulting in
> 0 + op2, resulting in op2.
>
> (2) op2 < op1. In this case no saturation happens, resulting in
> (op1 - op2) + op2 == op1.
Clever - but the high level description makes me wonder if this sort of
thing should be happening somewhere outside of config/i386/? I've been
watching the target-specific vector support get cleverer and cleverer
lately, and I'm not a big fan of clever targets.
--
Daniel Jacobowitz
CodeSourcery, LLC