[llvm-dev] D88905 - Boolean vectors

Simon Moll via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 10 00:49:50 PST 2022


Hi,

I'd like to call your attention again to D88905. This patch adds
boolean vector support to C/C++ with the ext_vector_type attribute. 
There is no generic mechanism to define a boolean vector type yet. We
want to use this type to expose VE target intrinsics on C/C++ level.

We are hoping to use this also to provide Vector Prediction intrinsics
in C/C++.  This could look like this:

   typedef bool bool256 __attribute__((ext_vector_type(256)));
   typedef float float256 __attribute__((ext_vector_type(256)));
   float* Ptr;
   bool256 Mask;
   int VectorLength = 127;

   float256 Data = vector_load_v256f32(Ptr, Mask, VectorLength)

The patch has been under review for a while now. There was no objection
to the approach and all outstanding comments have been addressed.

- Simon



More information about the llvm-dev mailing list