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: Vector comparison


On Mon, Aug 16, 2010 at 12:24:28PM -0700, Richard Henderson wrote:
> On 08/15/2010 12:15 PM, Artem Shinkarov wrote:
> > SSE and AltiVec at least define vector comparison result as a vector
> > of 0 and -1. So I think that this would be an exotic architecture (but
> > I'm not sure). Anyway, if the target returns boolean value, then the
> > implementation of the hook should return constant vector of zeros for
> > false and constant vector of -1-s for true.
> 
> MIPS isn't so exotic.  The result of a float-pair comparison is to
> set a pair of condition codes.  One can then use a branch that examines
> both CC results, or a special move instruction for the SELECT operation.

Vector comparisons on PPC E500 work roughly the same way.  I suppose
your clarification of producing VCOND should also work for E500, though.

-Nathan


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