[cfe-dev] OpenCL 'select' as a builtin?

Anastasia Stulova via cfe-dev cfe-dev at lists.llvm.org
Mon Jun 13 10:47:11 PDT 2016


Wondering if it would make sense to share __builtin_select among languages, assuming it has the same format...

Anastasia

From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Demikhovsky, Elena via cfe-dev
Sent: 13 June 2016 12:25
To: Martin.ORiordan at Movidius.com
Cc: cfe-dev
Subject: Re: [cfe-dev] OpenCL 'select' as a builtin?

No, there is no such intrinsic yet. We also need it for AVX-512 masked intrinsics.
So it is worth to add.
We use __builtin_ia32_select[b|w|d..]* meanwhile, which are not polymorphic.
See http://reviews.llvm.org/D21060.


-           Elena

From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Martin J. O'Riordan via cfe-dev
Sent: Saturday, June 11, 2016 08:05
To: 'Clang Dev' <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>>
Subject: [cfe-dev] OpenCL 'select' as a builtin?

Is there a builtin for CLang that implements the same semantics as OpenCL's "select" function, but which can be used from C and C++?

I tried the obvious name '__builtin_select' but that doesn't exist, and a trawl through the online docs didn't reveal anything either.

Thanks,

            MartinO


---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160613/1cc4559e/attachment.html>


More information about the cfe-dev mailing list