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 Sun, Aug 15, 2010 at 10:09 AM, Artem Shinkarov
<artyom.shinkaroff@gmail.com> wrote:
> This patch implements vector comparison according to OpenCL standard.
> The patch tries to dispatch vector comparison to hardware-specific
> instructions. If case when it is impossible, vector comparison is
> expanded piecewise.

I had posted a patch which had implemented them using the standard
tree codes and expansion and tree-lower-vect took care of the rest.
This was for reduction of vector comparison into a single scalar.
In fact we had agreed that they should implicitly turn a vector int
into a scalar when used in the context of a bool.
See http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01912.html .


Please consider using tree codes all the way through the gimple IR if
the target supports expansion and doing the expansion only at expand
time.  Building a call expression is expensive and really you could
use opcodes and not worry about a target hook.  I think opcodes it is
a much easier way allowing for targets to add support rather than
adding more and more target hooks.

Thanks,
Andrew Pinski


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